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

handler

package
v0.19.1254 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: 31 Imported by: 0

Documentation

Index

Constants

View Source
const (
	CancelUpdateName string = "cancel"
	CancelUpdateType        = handlerTypeUpdate
)
View Source
const (
	FinishedHandlerName string = "finished"
	FinishedHandlerType        = handlerTypeUpdate
)
View Source
const (
	ReadyHandlerName string = "ready"
	ReadyHandlerType        = handlerTypeUpdate
)
View Source
const (
	StatusQueryName string = "status"
	StatusQueryType        = handlerTypeQuery
)
View Source
const ExecuteUpdateName string = "execute"
View Source
const ValidateUpdateName string = "validate"

Variables

View Source
var DrainTimeout = callback.QuickTimeout
View Source
var ErrAlreadyExecuted = errors.New("signal already succeeded")

Functions

func StartHandler

func StartHandler(ctx workflow.Context, workflowID string, req HandlerRequest)

func UpdateWithStart added in v0.19.894

UpdateWithStart sends a Temporal update-with-start to the handler workflow for the given QueueSignal. Returns the WorkflowUpdateHandle for callers to retrieve results via handle.Get().

Types

type CancelRequest added in v0.19.850

type CancelRequest struct{}

type CancelResponse added in v0.19.850

type CancelResponse struct{}

type ExecuteResponse

type ExecuteResponse struct{}

type FinishedRequest

type FinishedRequest struct{}

type FinishedResponse

type FinishedResponse struct {
	Status            app.Status `json:"status"`
	StatusDescription string     `json:"status_description,omitempty"`
}

type HandlerRequest

type HandlerRequest struct {
	QueueID       string `validate:"required"`
	QueueSignalID string `validate:"required"`
}

type Params

type Params struct {
	fx.In

	Cfg           *internal.Config
	V             *validator.Validate
	MetricsWriter metrics.Writer
}

type ReadyRequest

type ReadyRequest struct{}

type ReadyResponse

type ReadyResponse struct {
	RunID string `json:"run_id"`
}

type StatusRequest added in v0.19.850

type StatusRequest struct{}

type StatusResponse added in v0.19.850

type StatusResponse struct {
	Finished bool
	Canceled bool
}

type UpdateWithStartOptions added in v0.19.894

type UpdateWithStartOptions struct {
	UpdateName   string
	WaitForStage tclient.WorkflowUpdateStage
	Args         []any
}

UpdateWithStartOptions configures the update sent to a handler workflow.

type ValidateResponse

type ValidateResponse struct{}

type Workflows

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

func NewWorkflows

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

func (*Workflows) All

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

func (*Workflows) Handler

func (w *Workflows) Handler(ctx workflow.Context, req HandlerRequest) error

@temporal-gen-v2 workflow @task-queue "handler" @id-template queue-{{.QueueID}}-handler-{{.QueueSignalID}} @memo type queue-handler

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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