async

package
v0.1.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 4, 2026 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrParsingPayload = errors.New("could not parse task payload")
)

Functions

This section is empty.

Types

type TaskPayload

type TaskPayload struct {
	TenantID   string
	ClientData auth.ClientData
	Data       []byte
}

TaskPayload represents the payload for an async task, including tenant context.

func NewTaskPayload

func NewTaskPayload(ctx context.Context, data []byte) TaskPayload

func ParseTaskPayload

func ParseTaskPayload(payload []byte) (TaskPayload, error)

func (*TaskPayload) InjectContext

func (p *TaskPayload) InjectContext(ctx context.Context) context.Context

func (*TaskPayload) ToBytes

func (p *TaskPayload) ToBytes() ([]byte, error)

type TenantListPayload

type TenantListPayload struct {
	TenantIDs []string
}

TenantListPayload represents a payload containing a list of tenant IDs. Can be used to trigger multi-tenant tasks to process specific tenants.

func NewTenantListPayload

func NewTenantListPayload(tenantIDs []string) TenantListPayload

func ParseTenantListPayload

func ParseTenantListPayload(payload []byte) (TenantListPayload, error)

func (*TenantListPayload) ToBytes

func (p *TenantListPayload) ToBytes() ([]byte, error)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL