aggregatedpool

package
v2.0.0 Latest Latest
Warning

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

Go to latest
Published: Nov 23, 2022 License: MIT Imports: 24 Imported by: 0

Documentation

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 GetWorkerInfo

func GetWorkerInfo(c common.Codec, p common.Pool, rrVersion string, wi *[]*internal.WorkerInfo) error

func GrabActivities

func GrabActivities(wi []*internal.WorkerInfo) map[string]*internal.ActivityInfo

func GrabWorkflows

func GrabWorkflows(wi []*internal.WorkerInfo) map[string]*internal.WorkflowInfo

func InitWorkers

func InitWorkers(wDef *Workflow, actDef *Activity, wi []*internal.WorkerInfo, log *zap.Logger, tc temporalClient.Client, graceTimeout time.Duration) ([]worker.Worker, error)

Types

type Activity

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

func NewActivityDefinition

func NewActivityDefinition(ac common.Codec, p common.Pool, log *zap.Logger, dc converter.DataConverter, client temporalClient.Client, gt time.Duration) *Activity

func (*Activity) GetActivityContext

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

type Callback

type Callback func() error

type Workflow

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

func NewWorkflowDefinition

func NewWorkflowDefinition(codec common.Codec, dc converter.DataConverter, pool common.Pool, log *zap.Logger, seqID func() uint64, client temporalClient.Client, gt time.Duration) *Workflow

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!!!!

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