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

executor

package
v1.19.0 Latest Latest
Warning

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

Go to latest
Published: Oct 22, 2026 License: Apache-2.0 Imports: 22 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// MetadataTaskType carries the task type of a Complete/Cancel call so
	// the receiving executor actor can deliver into the correctly
	// namespaced pending entry. Calls from pre-upgrade daprds lack it; the
	// task type is then inferred from the rendezvous key shape.
	MetadataTaskType = "tasktype"

	TaskTypeActivity = "activity"
	TaskTypeWorkflow = "workflow"
)
View Source
const (
	MethodComplete      = "Complete"
	MethodCancel        = "Cancel"
	MethodClaim         = "Claim"
	MethodWatchComplete = "WatchComplete"
)
View Source
const MetadataForwarded = "forwarded"

MetadataForwarded marks a Complete call that was already forwarded from a sibling-format rendezvous actor, so it is never forwarded again.

View Source
const MetadataHandoffs = "handoffs"

MetadataHandoffs counts how many times a parked completion or cancellation moved to a fresh executor actor because the actor that held it retired. A request that carries it also carries the forwarded marker.

Variables

This section is empty.

Functions

func New

func New(ctx context.Context, opts Options) (targets.Factory, error)

func PendingKey added in v1.19.0

func PendingKey(taskType, key string) string

PendingKey namespaces a rendezvous key by task type. The executor actor ID space is shared between workflow tasks (bare instance ID) and activity tasks (the activity actor ID "<instanceID>::<taskID>"), and instance IDs created through the TaskHub API may themselves contain "::": a workflow with instance ID "abc::5" and the activity with task ID 5 of a workflow "abc" share the executor actor ID "abc::5". Namespacing the pending map keeps their waiters and completions apart; the shared executor actor instance is harmless as it only ferries typed deliveries.

Types

type Options

type Options struct {
	Actors actors.Interface

	ActorType string

	// Pending is the process-local completion rendezvous shared with the
	// cluster tasks backend. Completions arriving at this actor are
	// delivered into it when the waiter is registered on this host.
	Pending *pending.Pending
}

Directories

Path Synopsis
Package pending implements a process-local rendezvous between workflow and activity task waiters and the completions reported by the application.
Package pending implements a process-local rendezvous between workflow and activity task waiters and the completions reported by the application.

Jump to

Keyboard shortcuts

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