Documentation ¶
Index ¶
- Constants
- func GetWorkerInfo(c Codec, p pool.Pool, rrVersion string, wi *[]*internal.WorkerInfo) error
- func GrabActivities(wi []*internal.WorkerInfo) map[string]*internal.ActivityInfo
- func GrabWorkflows(wi []*internal.WorkerInfo) map[string]*internal.WorkflowInfo
- func InitWorkers(wDef *Workflow, actDef *Activity, wi []*internal.WorkerInfo, log *zap.Logger, ...) ([]worker.Worker, error)
- type Activity
- type Callback
- type Codec
- type Workflow
Constants ¶
const ( RrMetricName string = "rr_activities_pool_queue_size" RrWorkflowsMetricName string = "rr_workflows_pool_queue_size" )
Variables ¶
This section is empty.
Functions ¶
func GetWorkerInfo ¶ added in v1.4.3
func GrabActivities ¶ added in v1.4.3
func GrabActivities(wi []*internal.WorkerInfo) map[string]*internal.ActivityInfo
func GrabWorkflows ¶ added in v1.4.3
func GrabWorkflows(wi []*internal.WorkerInfo) map[string]*internal.WorkflowInfo
func InitWorkers ¶ added in v1.4.3
Types ¶
type Activity ¶
type Activity struct {
// contains filtered or unexported fields
}
func NewActivityDefinition ¶
type Codec ¶
type Codec interface { // Encode encodes messages and context to the payload for the worker Encode(ctx *internal.Context, p *payload.Payload, msg ...*internal.Message) error // Decode decodes payload from the worker to the proto-message Decode(pld *payload.Payload, msg *[]*internal.Message) error // DecodeWorkerInfo decode a call to get a worker info ID=0 (initial) DecodeWorkerInfo(p *payload.Payload, wi *[]*internal.WorkerInfo) error }
type Workflow ¶
type Workflow struct {
// contains filtered or unexported fields
}
func NewWorkflowDefinition ¶
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 ¶
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 ¶
StackTrace of all coroutines owned by the Dispatcher instance.