helpers

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Jun 28, 2024 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ActionListSummary

func ActionListSummary(actions []*protos.OrchestratorAction) string

func CancelSpan added in v0.1.1

func CancelSpan(span trace.Span)

func ChangeSpanID added in v0.1.1

func ChangeSpanID(span trace.Span, newSpanID trace.SpanID)

func ContextFromTraceContext added in v0.1.1

func ContextFromTraceContext(ctx context.Context, tc *protos.TraceContext) (context.Context, error)

func FromRuntimeStatusString added in v0.1.1

func FromRuntimeStatusString(status string) protos.OrchestrationStatus

func GetDefaultWorkerName added in v0.1.1

func GetDefaultWorkerName() string

func GetTaskFunctionName added in v0.1.1

func GetTaskFunctionName(f any) string

func GetTaskId

func GetTaskId(e *protos.HistoryEvent) int32

func HistoryListSummary

func HistoryListSummary(list []*protos.HistoryEvent) string

func NewCompleteOrchestrationAction

func NewCompleteOrchestrationAction(
	taskID int32,
	status protos.OrchestrationStatus,
	rawResult *wrapperspb.StringValue,
	carryoverEvents []*protos.HistoryEvent,
	failureDetails *protos.TaskFailureDetails,
) *protos.OrchestratorAction

func NewCreateSubOrchestrationAction

func NewCreateSubOrchestrationAction(
	taskID int32,
	name string,
	iid string,
	input *wrapperspb.StringValue,
) *protos.OrchestratorAction

func NewCreateTimerAction

func NewCreateTimerAction(taskID int32, fireAt time.Time) *protos.OrchestratorAction

func NewEventRaisedEvent

func NewEventRaisedEvent(name string, rawInput *wrapperspb.StringValue) *protos.HistoryEvent

func NewExecutionCompletedEvent

func NewExecutionCompletedEvent(eventID int32, status protos.OrchestrationStatus, result *wrapperspb.StringValue, failureDetails *protos.TaskFailureDetails) *protos.HistoryEvent

func NewExecutionStartedEvent

func NewExecutionStartedEvent(
	name string,
	instanceId string,
	input *wrapperspb.StringValue,
	parent *protos.ParentInstanceInfo,
	parentTraceContext *protos.TraceContext,
	scheduledStartTimeStamp *timestamppb.Timestamp,
) *protos.HistoryEvent

func NewExecutionTerminatedEvent

func NewExecutionTerminatedEvent(rawReason *wrapperspb.StringValue, recurse bool) *protos.HistoryEvent

func NewOrchestratorStartedEvent

func NewOrchestratorStartedEvent() *protos.HistoryEvent

func NewParentInfo

func NewParentInfo(taskID int32, name string, iid string) *protos.ParentInstanceInfo

func NewResumeOrchestrationEvent added in v0.1.4

func NewResumeOrchestrationEvent(reason string) *protos.HistoryEvent

func NewScheduleTaskAction

func NewScheduleTaskAction(taskID int32, name string, input *wrapperspb.StringValue) *protos.OrchestratorAction

func NewSendEventAction

func NewSendEventAction(iid string, name string, data *wrapperspb.StringValue) *protos.OrchestratorAction

func NewSendEventEvent

func NewSendEventEvent(eventID int32, instanceID string, name string, rawInput *wrapperspb.StringValue) *protos.HistoryEvent

func NewSubOrchestrationCreatedEvent

func NewSubOrchestrationCreatedEvent(
	eventID int32,
	name string,
	version *wrapperspb.StringValue,
	rawInput *wrapperspb.StringValue,
	instanceID string,
	parentTraceContext *protos.TraceContext,
) *protos.HistoryEvent

func NewSuspendOrchestrationEvent added in v0.1.4

func NewSuspendOrchestrationEvent(reason string) *protos.HistoryEvent

func NewTaskCompletedEvent

func NewTaskCompletedEvent(taskID int32, result *wrapperspb.StringValue) *protos.HistoryEvent

func NewTaskFailedEvent

func NewTaskFailedEvent(taskID int32, failureDetails *protos.TaskFailureDetails) *protos.HistoryEvent

func NewTaskFailureDetails added in v0.3.0

func NewTaskFailureDetails(err error) *protos.TaskFailureDetails

func NewTaskScheduledEvent

func NewTaskScheduledEvent(
	taskID int32,
	name string,
	version *wrapperspb.StringValue,
	rawInput *wrapperspb.StringValue,
	tc *protos.TraceContext,
) *protos.HistoryEvent

func NewTerminateOrchestrationAction added in v0.3.0

func NewTerminateOrchestrationAction(taskID int32, iid string, recurse bool, rawReason *wrapperspb.StringValue) *protos.OrchestratorAction

func NewTimerCreatedEvent

func NewTimerCreatedEvent(eventID int32, fireAt *timestamppb.Timestamp) *protos.HistoryEvent

func NewTimerFiredEvent

func NewTimerFiredEvent(
	timerID int32,
	fireAt *timestamppb.Timestamp,
	parentTraceContext *protos.TraceContext,
) *protos.HistoryEvent

func NoopSpan added in v0.1.1

func NoopSpan() trace.Span

func SpanContextFromTraceContext added in v0.1.1

func SpanContextFromTraceContext(tc *protos.TraceContext) (trace.SpanContext, error)

func StartAndEndNewTimerSpan added in v0.1.1

func StartAndEndNewTimerSpan(ctx context.Context, tf *protos.TimerFiredEvent, createdTime time.Time, instanceID string) error

func StartNewActivitySpan added in v0.1.1

func StartNewActivitySpan(
	ctx context.Context, name string, version string, instanceID string, taskID int32,
) (context.Context, trace.Span)

func StartNewCreateOrchestrationSpan added in v0.1.1

func StartNewCreateOrchestrationSpan(
	ctx context.Context, name string, version string, instanceID string,
) (context.Context, trace.Span)

func StartNewRunOrchestrationSpan added in v0.1.1

func StartNewRunOrchestrationSpan(
	ctx context.Context, es *protos.ExecutionStartedEvent, startedTime time.Time,
) (context.Context, trace.Span)

func ToRuntimeStatusString added in v0.1.1

func ToRuntimeStatusString(status protos.OrchestrationStatus) string

func TraceContextFromSpan added in v0.1.1

func TraceContextFromSpan(span trace.Span) *protos.TraceContext

func UnsafeSetSpanContext added in v0.1.1

func UnsafeSetSpanContext(span trace.Span, spanContext trace.SpanContext) bool

Types

This section is empty.

Jump to

Keyboard shortcuts

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