emitter

package
v0.19.855 Latest Latest
Warning

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

Go to latest
Published: Mar 25, 2026 License: AGPL-3.0 Imports: 15 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

View Source
const (
	StopUpdateName          string = "stop"
	RestartUpdateName       string = "restart"
	StatusUpdateName        string = "status"
	EnsureRunningUpdateName string = "ensure-running"
	PauseUpdateName         string = "pause"
	ResumeUpdateName        string = "resume"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type CronTickerWorkflowRequest

type CronTickerWorkflowRequest struct {
	QueueID   string `validate:"required"`
	EmitterID string `validate:"required"`
}

type EmitterState

type EmitterState struct {
	EmitCount int64
}

EmitterState is the data that is passed between continue-as-news

type EmitterWorkflowRequest

type EmitterWorkflowRequest struct {
	QueueID   string `validate:"required"`
	EmitterID string `validate:"required"`
	Version   string `validate:"required"`

	State *EmitterState
}

type EnsureRunningRequest

type EnsureRunningRequest struct{}

type EnsureRunningResponse

type EnsureRunningResponse struct {
	Running   bool
	EmitterID string
	Mode      string
	EmitCount int64
	Stopped   bool
	Fired     bool
}

type Params

type Params struct {
	fx.In

	Cfg     *internal.Config
	V       *validator.Validate
	DB      *gorm.DB `name:"psql"`
	TClient temporalclient.Client
	L       *zap.Logger
}

type PauseRequest

type PauseRequest struct{}

type PauseResponse

type PauseResponse struct {
	Paused bool
}

type RestartRequest

type RestartRequest struct{}

type RestartResponse

type RestartResponse struct{}

type ResumeRequest

type ResumeRequest struct{}

type ResumeResponse

type ResumeResponse struct {
	Paused bool
}

type StatusRequest

type StatusRequest struct{}

type StatusResponse

type StatusResponse struct {
	EmitterID string
	QueueID   string
	EmitCount int64
	Stopped   bool
}

type StopRequest

type StopRequest struct{}

type StopResponse

type StopResponse struct{}

type Workflows

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

func NewWorkflows

func NewWorkflows(params Params) (*Workflows, error)

func (*Workflows) All

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

func (*Workflows) CronTicker

func (w *Workflows) CronTicker(ctx workflow.Context, req CronTickerWorkflowRequest) error

@temporal-gen-v2 workflow @task-queue "queue" @id-template queue-emitter-cron-{{.QueueID}}-{{.EmitterID}}

func (*Workflows) Emitter

func (w *Workflows) Emitter(ctx workflow.Context, req EmitterWorkflowRequest) error

@temporal-gen-v2 workflow @task-queue "queue" @id-template queue-emitter-{{.QueueID}}-{{.EmitterID}}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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