aggregatedpool

package
v5.11.0 Latest Latest
Warning

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

Go to latest
Published: May 15, 2026 License: MIT Imports: 27 Imported by: 0

Documentation

Overview

Package aggregatedpool implements Temporal workflow and activity definitions that bridge Go-based Temporal SDK workers with PHP worker processes via a message-based protocol.

Index

Constants

View Source
const (
	RrMetricName          string = "rr_activities_pool_queue_size"
	RrWorkflowsMetricName string = "rr_workflows_pool_queue_size"
)

Variables

This section is empty.

Functions

func NewWorkerInterceptor

func NewWorkerInterceptor() interceptor.WorkerInterceptor

func ResolveDataConverters added in v5.11.0

func ResolveDataConverters(
	converters map[string]converter.PayloadConverter,
	enabledOrder []string,
) ([]converter.PayloadConverter, error)

ResolveDataConverters returns the list of custom PayloadConverters to apply. When both inputs are empty, nil, nil is returned (no custom converters needed). When enabledOrder is non-empty, only those converters are used (in the specified order); an error is returned if any encoding is not found in the map. When enabledOrder is empty, all collected converters are applied.

func ResolveInterceptors added in v5.11.0

func ResolveInterceptors(
	interceptors map[string]api.Interceptor,
	enabledOrder []string,
) ([]sdkinterceptor.WorkerInterceptor, error)

ResolveInterceptors returns the list of WorkerInterceptors to apply. The built-in header context-bridging interceptor is always first. When enabledOrder is non-empty, only those named interceptors are used (in the specified order); an error is returned if any name is not found in the map. When enabledOrder is empty, all collected interceptors are applied.

func TemporalWorkers

func TemporalWorkers(wDef *Workflow, actDef *Activity, wi []*internal.WorkerInfo, log *zap.Logger, tc temporalClient.Client, interceptors map[string]api.Interceptor, configuredInterceptors []string) ([]worker.Worker, error)

Types

type Activity

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

func NewActivityDefinition

func NewActivityDefinition(ac api.Codec, p api.Pool, log *zap.Logger, disableActivityWorkers bool) *Activity

func (*Activity) GetActivityContext

func (a *Activity) GetActivityContext(taskToken []byte) (context.Context, error)

type Callback

type Callback func() error

type LaFn

type LaFn func(ctx context.Context, hdr *commonpb.Header, args *commonpb.Payloads) (*commonpb.Payloads, error)

type LocalActivityFn

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

func NewLocalActivityFn

func NewLocalActivityFn(codec api.Codec, pool api.Pool, log *zap.Logger) *LocalActivityFn

func (*LocalActivityFn) ExecuteLA

func (la *LocalActivityFn) ExecuteLA(ctx context.Context, hdr *commonpb.Header, args *commonpb.Payloads) (*commonpb.Payloads, error)

type Workflow

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

func NewWorkflowDefinition

func NewWorkflowDefinition(codec api.Codec, la LaFn, pool api.Pool, log *zap.Logger) *Workflow

NewWorkflowDefinition ... WorkflowDefinition Constructor

func (*Workflow) Close

func (wp *Workflow) Close()

func (*Workflow) Execute

func (wp *Workflow) Execute(env bindings.WorkflowEnvironment, header *commonpb.Header, input *commonpb.Payloads)

Execute implementation must be asynchronous.

func (*Workflow) NewWorkflowDefinition

func (wp *Workflow) NewWorkflowDefinition() bindings.WorkflowDefinition

NewWorkflowDefinition ... Workflow should match the WorkflowDefinitionFactory interface (sdk-go/internal/internal_worker.go:463, RegisterWorkflowWithOptions func) DO NOT USE THIS FUNCTION DIRECTLY!!!! This function called after the constructor above, it is safe to assign fields like that

func (*Workflow) OnWorkflowTaskStarted

func (wp *Workflow) OnWorkflowTaskStarted(t time.Duration)

OnWorkflowTaskStarted is called for each non-timed out startWorkflowTask event. Executed after all history events since the previous commands are applied to WorkflowDefinition Application level code must be executed from this function only. Execute call as well as callbacks called from WorkflowEnvironment functions can only schedule callbacks which can be executed from OnWorkflowTaskStarted(). FROM THE TEMPORAL DESCRIPTION

func (*Workflow) StackTrace

func (wp *Workflow) StackTrace() string

StackTrace of all coroutines owned by the Dispatcher instance.

Jump to

Keyboard shortcuts

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