api

package
v0.6.5 Latest Latest
Warning

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

Go to latest
Published: Feb 24, 2025 License: Apache-2.0 Imports: 6 Imported by: 10

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrInstanceNotFound  = errors.New("no such instance exists")
	ErrNotStarted        = errors.New("orchestration has not started")
	ErrNotCompleted      = errors.New("orchestration has not yet completed")
	ErrNoFailures        = errors.New("orchestration did not report failure details")
	ErrDuplicateInstance = errors.New("orchestration instance already exists")
	ErrIgnoreInstance    = errors.New("ignore creating orchestration instance")

	EmptyInstanceID = InstanceID("")
)

Functions

func OrchestrationMetadataIsComplete

func OrchestrationMetadataIsComplete(o *protos.OrchestrationMetadata) bool

func OrchestrationMetadataIsRunning

func OrchestrationMetadataIsRunning(o *protos.OrchestrationMetadata) bool

Types

type FetchOrchestrationMetadataOptions

type FetchOrchestrationMetadataOptions func(*protos.GetInstanceRequest)

GetOrchestrationMetadataOptions is a set of options for fetching orchestration metadata.

func WithFetchPayloads

func WithFetchPayloads(fetchPayloads bool) FetchOrchestrationMetadataOptions

WithFetchPayloads configures whether to load orchestration inputs, outputs, and custom status values, which could be large.

type InstanceID

type InstanceID string

InstanceID is a unique identifier for an orchestration instance.

type NewOrchestrationOptions

type NewOrchestrationOptions func(*protos.CreateInstanceRequest) error

NewOrchestrationOptions configures options for starting a new orchestration.

func WithInput

func WithInput(input any) NewOrchestrationOptions

WithInput configures an input for the orchestration. The specified input must be serializable.

func WithInstanceID

func WithInstanceID(id InstanceID) NewOrchestrationOptions

WithInstanceID configures an explicit orchestration instance ID. If not specified, a random UUID value will be used for the orchestration instance ID.

func WithOrchestrationIdReusePolicy

func WithOrchestrationIdReusePolicy(policy *protos.OrchestrationIdReusePolicy) NewOrchestrationOptions

WithOrchestrationIdReusePolicy configures Orchestration ID reuse policy.

func WithRawInput

func WithRawInput(rawInput *wrapperspb.StringValue) NewOrchestrationOptions

WithRawInput configures an input for the orchestration. The specified input must be a string.

func WithStartTime

func WithStartTime(startTime time.Time) NewOrchestrationOptions

WithStartTime configures a start time at which the orchestration should start running. Note that the actual start time could be later than the specified start time if the task hub is under load or if the app is not running at the specified start time.

type OrchestrationIdReusePolicy

type OrchestrationIdReusePolicy = protos.OrchestrationIdReusePolicy

type PurgeOptions

type PurgeOptions func(*protos.PurgeInstancesRequest) error

PurgeOptions is a set of options for purging an orchestration.

func WithRecursivePurge

func WithRecursivePurge(recursive bool) PurgeOptions

WithRecursivePurge configures whether to purge all sub-orchestrations created by the target orchestration.

type RaiseEventOptions

type RaiseEventOptions func(*protos.RaiseEventRequest) error

RaiseEventOptions is a set of options for raising an orchestration event.

func WithEventPayload

func WithEventPayload(data any) RaiseEventOptions

WithEventPayload configures an event payload. The specified payload must be serializable.

func WithRawEventData

func WithRawEventData(data *wrapperspb.StringValue) RaiseEventOptions

WithRawEventData configures an event payload that is a raw, unprocessed string (e.g. JSON data).

type TerminateOptions

type TerminateOptions func(*protos.TerminateRequest) error

TerminateOptions is a set of options for terminating an orchestration.

func WithOutput

func WithOutput(data any) TerminateOptions

WithOutput configures an output for the terminated orchestration. The specified output must be serializable.

func WithRawOutput

func WithRawOutput(data *wrapperspb.StringValue) TerminateOptions

WithRawOutput configures a raw, unprocessed output (i.e. pre-serialized) for the terminated orchestration.

func WithRecursiveTerminate

func WithRecursiveTerminate(recursive bool) TerminateOptions

WithRecursiveTerminate configures whether to terminate all sub-orchestrations created by the target orchestration.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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