helpers

package
v0.16.0 Latest Latest
Warning

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

Go to latest
Published: Nov 5, 2026 License: Apache-2.0 Imports: 17 Imported by: 2 modules, 1 package

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ActionListSummary

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

func CancelSpan

func CancelSpan(span trace.Span)

func ChangeSpanID

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

func ContextFromTraceContext

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

func FromRuntimeStatusString

func FromRuntimeStatusString(status string) protos.OrchestrationStatus

func GenerateChildWorkflowInstanceID added in v0.12.0

func GenerateChildWorkflowInstanceID(parentInstanceID string, actionID int32) string

GenerateChildWorkflowInstanceID generates a deterministic instance ID for a child workflow based on the parent instance ID and the action's sequence number.

func GetDefaultWorkerName

func GetDefaultWorkerName() string

func GetTaskFunctionName

func GetTaskFunctionName(f any) string

func GetTaskId

func GetTaskId(e *protos.HistoryEvent) int32

func HistoryListSummary

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

func NewRootTraceContext added in v0.12.3

func NewRootTraceContext() *protos.TraceContext

NewRootTraceContext returns a fresh W3C TraceContext with a randomly generated trace ID and span ID and the sampled flag set. It is intended for cases where a new root trace should be started explicitly, such as each generation of a ContinueAsNew workflow (dapr/dapr#10064): copying the previous generation's ParentTraceContext caused every generation to re-parent off the original trace and produced unbounded traces.

func NoopSpan

func NoopSpan() trace.Span

func SpanContextFromTraceContext

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

func StartAndEndNewTimerSpan

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

func StartNewActivitySpan

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

func StartNewCreateWorkflowSpan added in v0.12.0

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

func StartNewRunWorkflowSpan added in v0.12.0

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

func ToRuntimeStatusString

func ToRuntimeStatusString(status protos.OrchestrationStatus) string

func TraceContextFromSpan

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

func UnsafeSetSpanContext

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