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

execution

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Nov 1, 2026 License: MIT Imports: 15 Imported by: 0

Documentation

Overview

Package execution owns deterministic Temporal workflow execution.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Environment

type Environment struct {
	// Registry supplies registered handlers and trace extraction at attempts.
	Registry *workflow.Registry
	// WorkflowType resolves the registered native workflow name.
	WorkflowType func(string) string
	// StepType resolves the registered activity name.
	StepType func(string) string
	// SignalName resolves the native buffered signal channel name.
	SignalName func(string) string
	// JoinType resolves the activity name used to observe an existing run.
	JoinType func() string
	// Result waits through the native backend without taking cancellation ownership.
	Result func(context.Context, string) (protocol.Payload, error)
}

Environment supplies immutable registration and native naming dependencies. Result observes an existing run; canceling observation never cancels the run.

func (Environment) Activity

func (environment Environment) Activity(handler workflow.StepHandler) func(context.Context, protocol.Payload) (protocol.Payload, error)

Activity returns the Temporal activity function of a step handler. A failure becomes an application error that carries the workflow.EncodeError envelope; a workflow.Permanent failure is not retried.

func (Environment) Join

func (environment Environment) Join(ctx context.Context, id string) (protocol.Payload, error)

Join waits for the run id and returns its output. A child that joins an existing run uses it. A failure of the run is not retried.

func (Environment) Workflow

func (environment Environment) Workflow(handler workflow.WorkflowHandler) func(tworkflow.Context, protocol.Payload) (protocol.Payload, error)

Workflow returns the Temporal workflow function of a handler.

Jump to

Keyboard shortcuts

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