startworkflow

package
v1.2.0 Latest Latest
Warning

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

Go to latest
Published: Apr 17, 2026 License: MIT Imports: 27 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BeforeCreateHookFunc

type BeforeCreateHookFunc func(lease api.WorkflowLease) error

type StartOutcome

type StartOutcome int
const (
	StartErr StartOutcome = iota
	StartNew
	StartReused
	StartDeduped
)

func (StartOutcome) String

func (s StartOutcome) String() string

type Starter

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

Starter starts a new workflow execution.

func NewStarter

func NewStarter(
	shardContext historyi.ShardContext,
	workflowConsistencyChecker api.WorkflowConsistencyChecker,
	tokenSerializer *tasktoken.Serializer,
	request *historyservice.StartWorkflowExecutionRequest,
	matchingClient matchingservice.MatchingServiceClient,
	versionMembershipCache worker_versioning.VersionMembershipCache,
	reactivationSignalCache worker_versioning.ReactivationSignalCache,
	reactivationSignaler api.VersionReactivationSignalerFn,
	createLeaseFn api.CreateOrUpdateLeaseFunc,
) (*Starter, error)

NewStarter creates a new starter, fails if getting the active namespace fails.

func (*Starter) Invoke

func (s *Starter) Invoke(
	ctx context.Context,
) (resp *historyservice.StartWorkflowExecutionResponse, startOutcome StartOutcome, retError error)

Invoke starts a new workflow execution. NOTE: `beforeCreateHook` might be invoked more than once in the case where the workflow policy requires terminating the running workflow first; it is then invoked again on the newly started workflow.

Jump to

Keyboard shortcuts

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