Documentation
¶
Index ¶
- Constants
- Variables
- func EchoWorkflow(ctx workflow.Context, s string) (string, error)
- func MustCreateNexusService() *nexus.Service
- func ThroughputStressChild(ctx workflow.Context) error
- func ThroughputStressWorkflow(ctx workflow.Context, params *throughputstress.WorkflowParams) (throughputstress.WorkflowOutput, error)
- func WaitForCancelWorkflow(ctx workflow.Context, input nexus.NoValue) (nexus.NoValue, error)
- type Activities
- func (a *Activities) Payload(_ context.Context, in *PayloadActivityInput) ([]byte, error)
- func (a *Activities) SelfDescribe(ctx context.Context) error
- func (a *Activities) SelfQuery(ctx context.Context, queryType string) error
- func (a *Activities) SelfSignal(ctx context.Context, signalName string) error
- func (a *Activities) SelfUpdate(ctx context.Context, updateName string) error
- type PayloadActivityInput
Constants ¶
View Source
const ( UpdateSleep = "sleep" UpdateActivity = "activity" UpdateLocalActivity = "localActivity" ASignal = "someSignal" )
Variables ¶
View Source
var EchoAsyncOperation = temporalnexus.NewWorkflowRunOperation("echo-async", EchoWorkflow, func(ctx context.Context, s string, opts nexus.StartOperationOptions) (client.StartWorkflowOptions, error) { return client.StartWorkflowOptions{ ID: opts.RequestID, }, nil })
View Source
var EchoSyncOperation = temporalnexus.NewSyncOperation("echo-sync", func(ctx context.Context, c client.Client, s string, opts nexus.StartOperationOptions) (string, error) { return s, nil })
View Source
var ThroughputStressServiceName = "throughput-stress"
View Source
var WaitForCancelOperation = temporalnexus.NewWorkflowRunOperation("wait-for-cancel", WaitForCancelWorkflow, func(ctx context.Context, _ nexus.NoValue, opts nexus.StartOperationOptions) (client.StartWorkflowOptions, error) { return client.StartWorkflowOptions{ ID: opts.RequestID, }, nil })
Functions ¶
func MustCreateNexusService ¶
func ThroughputStressChild ¶
func ThroughputStressWorkflow ¶
func ThroughputStressWorkflow(ctx workflow.Context, params *throughputstress.WorkflowParams) (throughputstress.WorkflowOutput, error)
ThroughputStressWorkflow is meant to mimic the throughputstress scenario from bench-go of days past, but in a less-opaque way. We do not ask why it is the way it is, it is not our place to question the inscrutable ways of the old code.
Types ¶
type Activities ¶
func (*Activities) Payload ¶
func (a *Activities) Payload(_ context.Context, in *PayloadActivityInput) ([]byte, error)
Payload serves no purpose other than to accept inputs and return outputs of a specific size.
func (*Activities) SelfDescribe ¶
func (a *Activities) SelfDescribe(ctx context.Context) error
func (*Activities) SelfQuery ¶
func (a *Activities) SelfQuery(ctx context.Context, queryType string) error
func (*Activities) SelfSignal ¶
func (a *Activities) SelfSignal(ctx context.Context, signalName string) error
func (*Activities) SelfUpdate ¶
func (a *Activities) SelfUpdate(ctx context.Context, updateName string) error
type PayloadActivityInput ¶
type PayloadActivityInput struct { IgnoredInputData []byte // DesiredOutputSize determines the size of the output data in bytes, filled randomly. DesiredOutputSize int }
func MakePayloadInput ¶
func MakePayloadInput(inSize, outSize int) *PayloadActivityInput
Click to show internal directories.
Click to hide internal directories.