Help us shape the future of Go! Take the 2026 Go Developer Survey

emitter

package
v0.19.1253 Latest Latest
Warning

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

Go to latest
Published: Oct 20, 2026 License: AGPL-3.0 Imports: 24 Imported by: 0

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"
)
View Source
const CheckCANUpdateName string = "check-can"

Variables

This section is empty.

Functions

This section is empty.

Types

type CheckCANRequest added in v0.19.974

type CheckCANRequest struct{}

type CheckCANResponse added in v0.19.974

type CheckCANResponse struct {
	WorkflowType  string `json:"workflow_type"`
	Namespace     string `json:"namespace"`
	HistoryLength int    `json:"history_length"`
	HistoryMax    int    `json:"history_max"`
	Restarting    bool   `json:"restarting"`
}

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
	MetricsWriter metrics.Writer
}

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