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

temporal

package
v0.19.1255 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: 22 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New(v *validator.Validate, opts ...temporalOption) (*temporal, error)

func WithAddr

func WithAddr(addr string) temporalOption

func WithContextPropagator

func WithContextPropagator(propagator workflow.ContextPropagator) temporalOption

func WithContextPropagators

func WithContextPropagators(propagators []workflow.ContextPropagator) temporalOption

func WithDataConverter

func WithDataConverter(dataConverter converter.DataConverter) temporalOption

func WithLazyLoad

func WithLazyLoad(lazyLoad bool) temporalOption

func WithLogger

func WithLogger(log *zap.Logger) temporalOption

func WithMetricsWriter

func WithMetricsWriter(mw metrics.Writer) temporalOption

func WithNamespace

func WithNamespace(namespace string) temporalOption

Types

type Client

type Client interface {
	tclient.Client

	GetNamespaceClient(namespace string) (tclient.Client, error)

	// ExecuteWorkflowInNamespace is a wrapper that will execute a workflow in a different namespace
	ExecuteWorkflowInNamespace(ctx context.Context,
		namespace string,
		options tclient.StartWorkflowOptions,
		workflow interface{},
		args ...interface{}) (tclient.WorkflowRun, error)

	// GetWorkflowInNamespace is a wrapper that will get a workflow in a different namespace
	GetWorkflowInNamespace(ctx context.Context,
		namespace string,
		workflowID string,
		runID string) (tclient.WorkflowRun, error)

	// DescribeWorkflowExecutionInNamespace is a wrapper that will get a workflow in a different namespace
	DescribeWorkflowExecutionInNamespace(ctx context.Context,
		namespace string,
		workflowID string,
		runID string) (*workflowservice.DescribeWorkflowExecutionResponse, error)

	// DescribeWorkflowExecutionInNamespace is a wrapper that will get a workflow in a different namespace
	GetWorkflowStatusInNamespace(ctx context.Context,
		namespace string,
		workflowID string,
		runID string) (enumspb.WorkflowExecutionStatus, error)

	// CancelWorkflowInNamespace is a wrapper that will get a workflow in a different namespace
	CancelWorkflowInNamespace(ctx context.Context,
		namespace string,
		workflowID string,
		runID string) error

	// SignalWorkflowInNamespace is a wrapper that will signal a workflow in a different namespace
	SignalWorkflowInNamespace(ctx context.Context,
		namespace string,
		workflowID string,
		runID string,
		signalName string,
		signalArg interface{}) error

	// SignalWithStartWorkflowInNamespace is a wrapper that will signal and start a workflow in a different
	// namespace
	SignalWithStartWorkflowInNamespace(ctx context.Context,
		namespace string,
		workflowID string,
		signalName string,
		signalArg interface{},
		options tclient.StartWorkflowOptions,
		workflow interface{},
		workflowArgs interface{}) (tclient.WorkflowRun, error)

	UpdateWorkflowInNamespace(ctx context.Context,
		namespace string,
		opts tclient.UpdateWorkflowOptions,
	) (tclient.WorkflowUpdateHandle, error)

	UpdateWithStartWorkflowInNamespace(ctx context.Context,
		namespace string,
		opts tclient.UpdateWithStartWorkflowOptions) (tclient.WorkflowUpdateHandle, error)

	GetWorkflowUpdateHandleInNamespace(namespace string, ref tclient.GetWorkflowUpdateHandleOptions) tclient.WorkflowUpdateHandle

	QueryWorkflowInNamespace(ctx context.Context,
		namespace string,
		workflowID string,
		runID string,
		queryType string,
		args ...interface{}) (converter.EncodedValue, error)

	QueryWorkflowWithOptionsInNamespace(ctx context.Context,
		namespace string,
		request *tclient.QueryWorkflowWithOptionsRequest) (*tclient.QueryWorkflowWithOptionsResponse, error)
}

type ContextKey

type ContextKey struct{}

Jump to

Keyboard shortcuts

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