Documentation
¶
Index ¶
- func ActivitySequenceOrchestrator(ctx *task.OrchestrationContext) (any, error)
- func CallHttpEndpointActivity(ctx task.ActivityContext) (any, error)
- func ConfigureZipkinTracing() *trace.TracerProvider
- func DistributedTraceSampleOrchestrator(ctx *task.OrchestrationContext) (any, error)
- func DoWorkActivity(ctx task.ActivityContext) (any, error)
- func ExternalEventOrchestrator(ctx *task.OrchestrationContext) (any, error)
- func GetDevicesToUpdate(task.ActivityContext) (any, error)
- func Init(ctx context.Context, r *task.TaskRegistry) (backend.TaskHubClient, backend.TaskHubWorker)
- func RunDistributedTracingSample()
- func RunExternalEventsSample()
- func RunParallelSample()
- func RunSequenceSample()
- func SayHelloActivity(ctx task.ActivityContext) (any, error)
- func UpdateDevice(ctx task.ActivityContext) (any, error)
- func UpdateDevicesOrchestrator(ctx *task.OrchestrationContext) (any, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ActivitySequenceOrchestrator ¶
func ActivitySequenceOrchestrator(ctx *task.OrchestrationContext) (any, error)
ActivitySequenceOrchestrator makes three activity calls in sequence and results the results as an array.
func CallHttpEndpointActivity ¶
func CallHttpEndpointActivity(ctx task.ActivityContext) (any, error)
func ConfigureZipkinTracing ¶
func ConfigureZipkinTracing() *trace.TracerProvider
func DistributedTraceSampleOrchestrator ¶
func DistributedTraceSampleOrchestrator(ctx *task.OrchestrationContext) (any, error)
DistributedTraceSampleOrchestrator is a simple orchestration that's intended to generate distributed trace output to the configured exporter (e.g. zipkin).
func DoWorkActivity ¶
func DoWorkActivity(ctx task.ActivityContext) (any, error)
DoWorkActivity is a no-op activity function that sleeps for a specified amount of time.
func ExternalEventOrchestrator ¶
func ExternalEventOrchestrator(ctx *task.OrchestrationContext) (any, error)
ExternalEventOrchestrator is an orchestrator function that blocks for 30 seconds or until a "Name" event is sent to it.
func GetDevicesToUpdate ¶
func GetDevicesToUpdate(task.ActivityContext) (any, error)
GetDevicesToUpdate is an activity that returns a list of random device IDs to an orchestration.
func Init ¶
func Init(ctx context.Context, r *task.TaskRegistry) (backend.TaskHubClient, backend.TaskHubWorker)
Init creates and initializes an in-memory client and worker pair with default configuration.
func RunDistributedTracingSample ¶
func RunDistributedTracingSample()
func RunExternalEventsSample ¶
func RunExternalEventsSample()
func RunParallelSample ¶
func RunParallelSample()
func RunSequenceSample ¶
func RunSequenceSample()
func SayHelloActivity ¶
func SayHelloActivity(ctx task.ActivityContext) (any, error)
SayHelloActivity can be called by an orchestrator function and will return a friendly greeting.
func UpdateDevice ¶
func UpdateDevice(ctx task.ActivityContext) (any, error)
UpdateDevice is an activity that takes a device ID (string) and pretends to perform an update on the corresponding device, with a random 67% success rate.
func UpdateDevicesOrchestrator ¶
func UpdateDevicesOrchestrator(ctx *task.OrchestrationContext) (any, error)
UpdateDevicesOrchestrator is an orchestrator that runs activities in parallel
Types ¶
This section is empty.