enqueuer

package
v0.19.919 Latest Latest
Warning

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

Go to latest
Published: May 7, 2026 License: AGPL-3.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

View Source
const (
	EnqueueSourceChannel = "channel"
	EnqueueSourceAwait   = "await"
	EnqueueSourceSweep   = "sweep"
)

EnqueueSource identifies how a signal was enqueued.

Variables

This section is empty.

Functions

This section is empty.

Types

type Activities added in v0.19.919

type Activities struct {
	// contains filtered or unexported fields
}

Activities wraps the Enqueuer methods that should be registered as Temporal activities. This avoids exposing non-activity methods (e.g. Send) which would cause Temporal to panic on registration.

func NewActivities added in v0.19.919

func NewActivities(e *Enqueuer) *Activities

func (*Activities) Sweep added in v0.19.919

func (a *Activities) Sweep(ctx context.Context, _ *SweepRequest) error

@temporal-gen-v2 activity @start-to-close-timeout 2m

type Enqueuer

type Enqueuer struct {
	// contains filtered or unexported fields
}

Enqueuer processes signal enqueue requests in the background. It receives queue signal IDs via a channel and performs the UpdateWithStart call to enqueue them into their respective queue workflows.

func New

func New(params Params) *Enqueuer

func (*Enqueuer) EnqueueInline added in v0.19.919

func (e *Enqueuer) EnqueueInline(ctx context.Context, queueSignalID string, source string) error

EnqueueInline synchronously enqueues a queue signal by performing the UpdateWithStart call inline with the caller. It records enqueue timing metadata (including the enqueue source) and marks the signal as enqueued on success.

func (*Enqueuer) Send

func (e *Enqueuer) Send(queueSignalID string)

Send enqueues a queue signal ID for background processing. If the channel is full the ID is dropped — the AwaitSignal inline path will pick it up.

type Params

type Params struct {
	fx.In

	DB      *gorm.DB `name:"psql"`
	Cfg     *internal.Config
	TClient temporalclient.Client
	L       *zap.Logger
	LC      fx.Lifecycle
}

type SweepRequest added in v0.19.919

type SweepRequest struct{}

type SweepWorkflowRequest added in v0.19.919

type SweepWorkflowRequest struct{}

type Workflows added in v0.19.919

type Workflows struct{}

func NewWorkflows added in v0.19.919

func NewWorkflows() *Workflows

func (*Workflows) All added in v0.19.919

func (w *Workflows) All() []any

func (*Workflows) EnqueuerSweep added in v0.19.919

func (w *Workflows) EnqueuerSweep(ctx workflow.Context, req SweepWorkflowRequest) error

@temporal-gen-v2 workflow @task-queue "queue" @id-template enqueuer-sweep

Jump to

Keyboard shortcuts

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