Documentation
¶
Overview ¶
Code generated by protoc-gen-go_temporal. DO NOT EDIT. versions:
protoc-gen-go_temporal dev (latest) protoc (unknown)
source: test/patch/example.proto
Index ¶
- Constants
- Variables
- func NewFooServiceCli(options ...*FooServiceCliOptions) (*v2.App, error)
- func NewFooServiceCliCommand(options ...*FooServiceCliOptions) (*v2.Command, error)
- func NewFooServiceClientOptions() *fooServiceClientOptions
- func RegisterFooActivity(r worker.ActivityRegistry, ...)
- func RegisterFooServiceActivities(r worker.ActivityRegistry, activities FooServiceActivities)
- func RegisterFooServiceWorkflows(r worker.WorkflowRegistry, workflows FooServiceWorkflows)
- func RegisterFooWorkflow(r worker.WorkflowRegistry, ...)
- func WithFooServiceSchemeTypes() scheme.Option
- type FooActivityOptions
- func (o *FooActivityOptions) Build(ctx workflow.Context) (workflow.Context, error)
- func (o *FooActivityOptions) WithActivityOptions(options workflow.ActivityOptions) *FooActivityOptions
- func (o *FooActivityOptions) WithDataConverter(dc converter.DataConverter) *FooActivityOptions
- func (o *FooActivityOptions) WithHeartbeatTimeout(d time.Duration) *FooActivityOptions
- func (o *FooActivityOptions) WithRetryPolicy(policy *temporal.RetryPolicy) *FooActivityOptions
- func (o *FooActivityOptions) WithScheduleToCloseTimeout(d time.Duration) *FooActivityOptions
- func (o *FooActivityOptions) WithScheduleToStartTimeout(d time.Duration) *FooActivityOptions
- func (o *FooActivityOptions) WithStartToCloseTimeout(d time.Duration) *FooActivityOptions
- func (o *FooActivityOptions) WithTaskQueue(tq string) *FooActivityOptions
- func (o *FooActivityOptions) WithWaitForCancellation(wait bool) *FooActivityOptions
- type FooChildOptions
- func (o *FooChildOptions) Build(ctx workflow.Context, req protoreflect.Message) (workflow.ChildWorkflowOptions, error)
- func (o *FooChildOptions) WithChildWorkflowOptions(options workflow.ChildWorkflowOptions) *FooChildOptions
- func (o *FooChildOptions) WithDataConverter(dc converter.DataConverter) *FooChildOptions
- func (o *FooChildOptions) WithExecutionTimeout(d time.Duration) *FooChildOptions
- func (o *FooChildOptions) WithID(id string) *FooChildOptions
- func (o *FooChildOptions) WithIDReusePolicy(policy enumsv1.WorkflowIdReusePolicy) *FooChildOptions
- func (o *FooChildOptions) WithParentClosePolicy(policy enumsv1.ParentClosePolicy) *FooChildOptions
- func (o *FooChildOptions) WithRetryPolicy(policy *temporal.RetryPolicy) *FooChildOptions
- func (o *FooChildOptions) WithRunTimeout(d time.Duration) *FooChildOptions
- func (o *FooChildOptions) WithSearchAttributes(sa map[string]any) *FooChildOptions
- func (o *FooChildOptions) WithTaskQueue(tq string) *FooChildOptions
- func (o *FooChildOptions) WithTaskTimeout(d time.Duration) *FooChildOptions
- func (o *FooChildOptions) WithTypedSearchAttributes(tsa temporal.SearchAttributes) *FooChildOptions
- func (o *FooChildOptions) WithWaitForCancellation(wait bool) *FooChildOptions
- type FooChildRun
- func (r *FooChildRun) Get(ctx workflow.Context) (*FooOutput, error)
- func (r *FooChildRun) Select(sel workflow.Selector, fn func(*FooChildRun)) workflow.Selector
- func (r *FooChildRun) SelectStart(sel workflow.Selector, fn func(*FooChildRun)) workflow.Selector
- func (r *FooChildRun) WaitStart(ctx workflow.Context) (*workflow.Execution, error)
- type FooFuture
- type FooInput
- type FooLocalActivityOptions
- func (o *FooLocalActivityOptions) Build(ctx workflow.Context) (workflow.Context, error)
- func (o *FooLocalActivityOptions) Local(fn func(context.Context, *FooInput) (*FooOutput, error)) *FooLocalActivityOptions
- func (o *FooLocalActivityOptions) WithDataConverter(dc converter.DataConverter) *FooLocalActivityOptions
- func (o *FooLocalActivityOptions) WithLocalActivityOptions(options workflow.LocalActivityOptions) *FooLocalActivityOptions
- func (o *FooLocalActivityOptions) WithRetryPolicy(policy *temporal.RetryPolicy) *FooLocalActivityOptions
- func (o *FooLocalActivityOptions) WithScheduleToCloseTimeout(d time.Duration) *FooLocalActivityOptions
- func (o *FooLocalActivityOptions) WithStartToCloseTimeout(d time.Duration) *FooLocalActivityOptions
- type FooOptions
- func (o *FooOptions) Build(req protoreflect.Message) (client.StartWorkflowOptions, error)
- func (o *FooOptions) WithEnableEagerStart(enable bool) *FooOptions
- func (o *FooOptions) WithExecutionTimeout(d time.Duration) *FooOptions
- func (o *FooOptions) WithID(id string) *FooOptions
- func (o *FooOptions) WithIDReusePolicy(policy enumsv1.WorkflowIdReusePolicy) *FooOptions
- func (o *FooOptions) WithRetryPolicy(policy *temporal.RetryPolicy) *FooOptions
- func (o *FooOptions) WithRunTimeout(d time.Duration) *FooOptions
- func (o *FooOptions) WithSearchAttributes(sa map[string]any) *FooOptions
- func (o *FooOptions) WithStartWorkflowOptions(options client.StartWorkflowOptions) *FooOptions
- func (o *FooOptions) WithTaskQueue(tq string) *FooOptions
- func (o *FooOptions) WithTaskTimeout(d time.Duration) *FooOptions
- func (o *FooOptions) WithTypedSearchAttributes(tsa temporal.SearchAttributes) *FooOptions
- func (o *FooOptions) WithWorkflowIdConflictPolicy(policy enumsv1.WorkflowIdConflictPolicy) *FooOptions
- type FooOutput
- func Foo(ctx workflow.Context, req *FooInput, options ...*FooActivityOptions) (*FooOutput, error)
- func FooChild(ctx workflow.Context, req *FooInput, options ...*FooChildOptions) (*FooOutput, error)
- func FooLocal(ctx workflow.Context, req *FooInput, options ...*FooLocalActivityOptions) (*FooOutput, error)
- type FooRun
- type FooServiceActivities
- type FooServiceCliOptions
- func (opts *FooServiceCliOptions) WithAfter(fn func(*v2.Context) error) *FooServiceCliOptions
- func (opts *FooServiceCliOptions) WithBefore(fn func(*v2.Context) error) *FooServiceCliOptions
- func (opts *FooServiceCliOptions) WithClient(fn func(*v2.Context) (client.Client, error)) *FooServiceCliOptions
- func (opts *FooServiceCliOptions) WithWorker(fn func(*v2.Context, client.Client) (worker.Worker, error)) *FooServiceCliOptions
- type FooServiceClient
- type FooServiceWorkflowFunctions
- type FooServiceWorkflows
- type FooWorkflow
- type FooWorkflowInput
- type TestFooServiceClient
- func (c *TestFooServiceClient) CancelWorkflow(ctx context.Context, workflowID string, runID string) error
- func (c *TestFooServiceClient) Foo(ctx context.Context, req *FooInput, opts ...*FooOptions) (*FooOutput, error)
- func (c *TestFooServiceClient) FooAsync(ctx context.Context, req *FooInput, options ...*FooOptions) (FooRun, error)
- func (c *TestFooServiceClient) GetFoo(ctx context.Context, workflowID string, runID string) FooRun
- func (c *TestFooServiceClient) TerminateWorkflow(ctx context.Context, workflowID string, runID string, reason string, ...) error
Constants ¶
const (
FooActivityName = "test.patch.FooService.Foo"
)
test.patch.FooService activity names
const (
FooWorkflowName = "test.patch.FooService.Foo"
)
test.patch.FooService workflow names
Variables ¶
var File_test_patch_example_proto protoreflect.FileDescriptor
var ( // FooFunction implements a "test.patch.FooService.Foo" workflow FooFunction func(workflow.Context, *FooInput) (*FooOutput, error) )
Reference to generated workflow functions
var FooServiceTaskQueue = "foo-queue"
FooServiceTaskQueue is the default task-queue for a test.patch.FooService worker
Functions ¶
func NewFooServiceCli ¶
func NewFooServiceCli(options ...*FooServiceCliOptions) (*v2.App, error)
NewFooServiceCli initializes a cli for a(n) test.patch.FooService service
func NewFooServiceCliCommand ¶
func NewFooServiceCliCommand(options ...*FooServiceCliOptions) (*v2.Command, error)
NewFooServiceCliCommand initializes a cli command for a test.patch.FooService service with subcommands for each query, signal, update, and workflow
func NewFooServiceClientOptions ¶
func NewFooServiceClientOptions() *fooServiceClientOptions
NewFooServiceClientOptions initializes a new fooServiceClientOptions value
func RegisterFooActivity ¶
func RegisterFooActivity(r worker.ActivityRegistry, fn func(context.Context, *FooInput) (*FooOutput, error))
RegisterFooActivity registers a test.patch.FooService.Foo activity
func RegisterFooServiceActivities ¶
func RegisterFooServiceActivities(r worker.ActivityRegistry, activities FooServiceActivities)
RegisterFooServiceActivities registers activities with a worker
func RegisterFooServiceWorkflows ¶
func RegisterFooServiceWorkflows(r worker.WorkflowRegistry, workflows FooServiceWorkflows)
RegisterFooServiceWorkflows registers test.patch.FooService workflows with the given worker
func RegisterFooWorkflow ¶
func RegisterFooWorkflow(r worker.WorkflowRegistry, wf func(workflow.Context, *FooWorkflowInput) (FooWorkflow, error))
RegisterFooWorkflow registers a test.patch.FooService.Foo workflow with the given worker
func WithFooServiceSchemeTypes ¶
WithFooServiceSchemeTypes registers all FooService protobuf types with the given scheme
Types ¶
type FooActivityOptions ¶
type FooActivityOptions struct {
// contains filtered or unexported fields
}
FooActivityOptions provides configuration for a(n) test.patch.FooService.Foo activity
func NewFooActivityOptions ¶
func NewFooActivityOptions() *FooActivityOptions
NewFooActivityOptions initializes a new FooActivityOptions value
func (*FooActivityOptions) Build ¶
Build initializes a workflow.Context with appropriate ActivityOptions values derived from schema defaults and any user-defined overrides
func (*FooActivityOptions) WithActivityOptions ¶
func (o *FooActivityOptions) WithActivityOptions(options workflow.ActivityOptions) *FooActivityOptions
WithActivityOptions specifies an initial ActivityOptions value to which defaults will be applied
func (*FooActivityOptions) WithDataConverter ¶ added in v1.17.0
func (o *FooActivityOptions) WithDataConverter(dc converter.DataConverter) *FooActivityOptions
WithDataConverter registers a DataConverter for the (local) activity
func (*FooActivityOptions) WithHeartbeatTimeout ¶
func (o *FooActivityOptions) WithHeartbeatTimeout(d time.Duration) *FooActivityOptions
WithHeartbeatTimeout sets the HeartbeatTimeout value
func (*FooActivityOptions) WithRetryPolicy ¶
func (o *FooActivityOptions) WithRetryPolicy(policy *temporal.RetryPolicy) *FooActivityOptions
WithRetryPolicy sets the RetryPolicy value
func (*FooActivityOptions) WithScheduleToCloseTimeout ¶
func (o *FooActivityOptions) WithScheduleToCloseTimeout(d time.Duration) *FooActivityOptions
WithScheduleToCloseTimeout sets the ScheduleToCloseTimeout value
func (*FooActivityOptions) WithScheduleToStartTimeout ¶
func (o *FooActivityOptions) WithScheduleToStartTimeout(d time.Duration) *FooActivityOptions
WithScheduleToStartTimeout sets the ScheduleToStartTimeout value
func (*FooActivityOptions) WithStartToCloseTimeout ¶
func (o *FooActivityOptions) WithStartToCloseTimeout(d time.Duration) *FooActivityOptions
WithStartToCloseTimeout sets the StartToCloseTimeout value
func (*FooActivityOptions) WithTaskQueue ¶
func (o *FooActivityOptions) WithTaskQueue(tq string) *FooActivityOptions
WithTaskQueue sets the TaskQueue value
func (*FooActivityOptions) WithWaitForCancellation ¶
func (o *FooActivityOptions) WithWaitForCancellation(wait bool) *FooActivityOptions
WithWaitForCancellation sets the WaitForCancellation value
type FooChildOptions ¶
type FooChildOptions struct {
// contains filtered or unexported fields
}
FooChildOptions provides configuration for a child test.patch.FooService.Foo workflow operation
func NewFooChildOptions ¶
func NewFooChildOptions() *FooChildOptions
NewFooChildOptions initializes a new FooChildOptions value
func (*FooChildOptions) Build ¶
func (o *FooChildOptions) Build(ctx workflow.Context, req protoreflect.Message) (workflow.ChildWorkflowOptions, error)
Build initializes a new go.temporal.io/sdk/workflow.ChildWorkflowOptions value with defaults and overrides applied
func (*FooChildOptions) WithChildWorkflowOptions ¶
func (o *FooChildOptions) WithChildWorkflowOptions(options workflow.ChildWorkflowOptions) *FooChildOptions
WithChildWorkflowOptions sets the initial go.temporal.io/sdk/workflow.ChildWorkflowOptions
func (*FooChildOptions) WithDataConverter ¶ added in v1.17.0
func (o *FooChildOptions) WithDataConverter(dc converter.DataConverter) *FooChildOptions
WithDataConverter registers a DataConverter for the child workflow
func (*FooChildOptions) WithExecutionTimeout ¶
func (o *FooChildOptions) WithExecutionTimeout(d time.Duration) *FooChildOptions
WithExecutionTimeout sets the WorkflowExecutionTimeout value
func (*FooChildOptions) WithID ¶
func (o *FooChildOptions) WithID(id string) *FooChildOptions
WithID sets the WorkflowID value
func (*FooChildOptions) WithIDReusePolicy ¶
func (o *FooChildOptions) WithIDReusePolicy(policy enumsv1.WorkflowIdReusePolicy) *FooChildOptions
WithIDReusePolicy sets the WorkflowIDReusePolicy value
func (*FooChildOptions) WithParentClosePolicy ¶
func (o *FooChildOptions) WithParentClosePolicy(policy enumsv1.ParentClosePolicy) *FooChildOptions
WithParentClosePolicy sets the WorkflowIDReusePolicy value
func (*FooChildOptions) WithRetryPolicy ¶
func (o *FooChildOptions) WithRetryPolicy(policy *temporal.RetryPolicy) *FooChildOptions
WithRetryPolicy sets the RetryPolicy value
func (*FooChildOptions) WithRunTimeout ¶
func (o *FooChildOptions) WithRunTimeout(d time.Duration) *FooChildOptions
WithRunTimeout sets the WorkflowRunTimeout value
func (*FooChildOptions) WithSearchAttributes ¶
func (o *FooChildOptions) WithSearchAttributes(sa map[string]any) *FooChildOptions
WithSearchAttributes sets the SearchAttributes value
func (*FooChildOptions) WithTaskQueue ¶
func (o *FooChildOptions) WithTaskQueue(tq string) *FooChildOptions
WithTaskQueue sets the TaskQueue value
func (*FooChildOptions) WithTaskTimeout ¶
func (o *FooChildOptions) WithTaskTimeout(d time.Duration) *FooChildOptions
WithTaskTimeout sets the WorkflowTaskTimeout value
func (*FooChildOptions) WithTypedSearchAttributes ¶ added in v1.19.0
func (o *FooChildOptions) WithTypedSearchAttributes(tsa temporal.SearchAttributes) *FooChildOptions
WithTypedSearchAttributes sets the TypedSearchAttributes value
func (*FooChildOptions) WithWaitForCancellation ¶
func (o *FooChildOptions) WithWaitForCancellation(wait bool) *FooChildOptions
WithWaitForCancellation sets the WaitForCancellation value
type FooChildRun ¶
type FooChildRun struct {
Future workflow.ChildWorkflowFuture
}
FooChildRun describes a child Foo workflow run
func FooChildAsync ¶
func FooChildAsync(ctx workflow.Context, req *FooInput, options ...*FooChildOptions) (*FooChildRun, error)
FooChildAsync starts a child test.patch.FooService.Foo workflow and returns a handle to the child workflow run
func (*FooChildRun) Get ¶
func (r *FooChildRun) Get(ctx workflow.Context) (*FooOutput, error)
Get blocks until the workflow is completed, returning the response value
func (*FooChildRun) Select ¶
func (r *FooChildRun) Select(sel workflow.Selector, fn func(*FooChildRun)) workflow.Selector
Select adds this completion to the selector. Callback can be nil.
func (*FooChildRun) SelectStart ¶
func (r *FooChildRun) SelectStart(sel workflow.Selector, fn func(*FooChildRun)) workflow.Selector
SelectStart adds waiting for start to the selector. Callback can be nil.
type FooFuture ¶
FooFuture describes a(n) test.patch.FooService.Foo activity execution
func FooAsync ¶
func FooAsync(ctx workflow.Context, req *FooInput, options ...*FooActivityOptions) *FooFuture
FooAsync executes a(n) test.patch.FooService.Foo activity (asynchronously)
func FooLocalAsync ¶
func FooLocalAsync(ctx workflow.Context, req *FooInput, options ...*FooLocalActivityOptions) *FooFuture
FooLocalAsync executes a(n) test.patch.FooService.Foo activity (asynchronously, locally)
type FooInput ¶
type FooInput struct {
FooID string `protobuf:"bytes,1,opt,name=foo_id,json=fooID,proto3" json:"fooID"`
// contains filtered or unexported fields
}
func UnmarshalCliFlagsToFooInput ¶
func UnmarshalCliFlagsToFooInput(cmd *v2.Context, options ...helpers.UnmarshalCliFlagsOptions) (*FooInput, error)
UnmarshalCliFlagsToFooInput unmarshals a FooInput from command line flags
func (*FooInput) Descriptor
deprecated
func (*FooInput) ProtoMessage ¶
func (*FooInput) ProtoMessage()
func (*FooInput) ProtoReflect ¶
func (x *FooInput) ProtoReflect() protoreflect.Message
type FooLocalActivityOptions ¶
type FooLocalActivityOptions struct {
// contains filtered or unexported fields
}
FooLocalActivityOptions provides configuration for a(n) test.patch.FooService.Foo activity
func NewFooLocalActivityOptions ¶
func NewFooLocalActivityOptions() *FooLocalActivityOptions
NewFooLocalActivityOptions initializes a new FooLocalActivityOptions value
func (*FooLocalActivityOptions) Build ¶
Build initializes a workflow.Context with appropriate LocalActivityOptions values derived from schema defaults and any user-defined overrides
func (*FooLocalActivityOptions) Local ¶
func (o *FooLocalActivityOptions) Local(fn func(context.Context, *FooInput) (*FooOutput, error)) *FooLocalActivityOptions
Local specifies a custom test.patch.FooService.Foo implementation
func (*FooLocalActivityOptions) WithDataConverter ¶ added in v1.17.0
func (o *FooLocalActivityOptions) WithDataConverter(dc converter.DataConverter) *FooLocalActivityOptions
WithDataConverter registers a DataConverter for the (local) activity
func (*FooLocalActivityOptions) WithLocalActivityOptions ¶
func (o *FooLocalActivityOptions) WithLocalActivityOptions(options workflow.LocalActivityOptions) *FooLocalActivityOptions
WithLocalActivityOptions specifies an initial LocalActivityOptions value to which defaults will be applied
func (*FooLocalActivityOptions) WithRetryPolicy ¶
func (o *FooLocalActivityOptions) WithRetryPolicy(policy *temporal.RetryPolicy) *FooLocalActivityOptions
WithRetryPolicy sets the RetryPolicy value
func (*FooLocalActivityOptions) WithScheduleToCloseTimeout ¶
func (o *FooLocalActivityOptions) WithScheduleToCloseTimeout(d time.Duration) *FooLocalActivityOptions
WithScheduleToCloseTimeout sets the ScheduleToCloseTimeout value
func (*FooLocalActivityOptions) WithStartToCloseTimeout ¶
func (o *FooLocalActivityOptions) WithStartToCloseTimeout(d time.Duration) *FooLocalActivityOptions
WithStartToCloseTimeout sets the StartToCloseTimeout value
type FooOptions ¶
type FooOptions struct {
// contains filtered or unexported fields
}
FooOptions provides configuration for a test.patch.FooService.Foo workflow operation
func NewFooOptions ¶
func NewFooOptions() *FooOptions
NewFooOptions initializes a new FooOptions value
func (*FooOptions) Build ¶
func (o *FooOptions) Build(req protoreflect.Message) (client.StartWorkflowOptions, error)
Build initializes a new go.temporal.io/sdk/client.StartWorkflowOptions value with defaults and overrides applied
func (*FooOptions) WithEnableEagerStart ¶ added in v1.19.0
func (o *FooOptions) WithEnableEagerStart(enable bool) *FooOptions
WithEnableEagerStart sets the EnableEagerStart value
func (*FooOptions) WithExecutionTimeout ¶
func (o *FooOptions) WithExecutionTimeout(d time.Duration) *FooOptions
WithExecutionTimeout sets the WorkflowExecutionTimeout value
func (*FooOptions) WithID ¶
func (o *FooOptions) WithID(id string) *FooOptions
WithID sets the ID value
func (*FooOptions) WithIDReusePolicy ¶
func (o *FooOptions) WithIDReusePolicy(policy enumsv1.WorkflowIdReusePolicy) *FooOptions
WithIDReusePolicy sets the WorkflowIDReusePolicy value
func (*FooOptions) WithRetryPolicy ¶
func (o *FooOptions) WithRetryPolicy(policy *temporal.RetryPolicy) *FooOptions
WithRetryPolicy sets the RetryPolicy value
func (*FooOptions) WithRunTimeout ¶
func (o *FooOptions) WithRunTimeout(d time.Duration) *FooOptions
WithRunTimeout sets the WorkflowRunTimeout value
func (*FooOptions) WithSearchAttributes ¶
func (o *FooOptions) WithSearchAttributes(sa map[string]any) *FooOptions
WithSearchAttributes sets the SearchAttributes value
func (*FooOptions) WithStartWorkflowOptions ¶
func (o *FooOptions) WithStartWorkflowOptions(options client.StartWorkflowOptions) *FooOptions
WithStartWorkflowOptions sets the initial go.temporal.io/sdk/client.StartWorkflowOptions
func (*FooOptions) WithTaskQueue ¶
func (o *FooOptions) WithTaskQueue(tq string) *FooOptions
WithTaskQueue sets the TaskQueue value
func (*FooOptions) WithTaskTimeout ¶
func (o *FooOptions) WithTaskTimeout(d time.Duration) *FooOptions
WithTaskTimeout sets the WorkflowTaskTimeout value
func (*FooOptions) WithTypedSearchAttributes ¶ added in v1.19.0
func (o *FooOptions) WithTypedSearchAttributes(tsa temporal.SearchAttributes) *FooOptions
WithTypedSearchAttributes sets the TypedSearchAttributes value
func (*FooOptions) WithWorkflowIdConflictPolicy ¶ added in v1.17.0
func (o *FooOptions) WithWorkflowIdConflictPolicy(policy enumsv1.WorkflowIdConflictPolicy) *FooOptions
WithWorkflowIdConflictPolicy sets the WorkflowIdConflictPolicy value
type FooOutput ¶
type FooOutput struct {
// contains filtered or unexported fields
}
func FooChild ¶
FooChild executes a child test.patch.FooService.Foo workflow and blocks until error or response received
func FooLocal ¶
func FooLocal(ctx workflow.Context, req *FooInput, options ...*FooLocalActivityOptions) (*FooOutput, error)
FooLocal executes a(n) test.patch.FooService.Foo activity (locally)
func (*FooOutput) Descriptor
deprecated
func (*FooOutput) ProtoMessage ¶
func (*FooOutput) ProtoMessage()
func (*FooOutput) ProtoReflect ¶
func (x *FooOutput) ProtoReflect() protoreflect.Message
type FooRun ¶
type FooRun interface {
// ID returns the workflow ID
ID() string
// RunID returns the workflow instance ID
RunID() string
// Run returns the inner client.WorkflowRun
Run() client.WorkflowRun
// Get blocks until the workflow is complete and returns the result
Get(ctx context.Context) (*FooOutput, error)
// Cancel requests cancellation of a workflow in execution, returning an error if applicable
Cancel(ctx context.Context) error
// Terminate terminates a workflow in execution, returning an error if applicable
Terminate(ctx context.Context, reason string, details ...interface{}) error
}
FooRun describes a(n) test.patch.FooService.Foo workflow run
type FooServiceActivities ¶
type FooServiceActivities interface {
// test.patch.FooService.Foo implements a(n) test.patch.FooService.Foo activity definition
Foo(ctx context.Context, req *FooInput) (*FooOutput, error)
}
FooServiceActivities describes available worker activities
type FooServiceCliOptions ¶
type FooServiceCliOptions struct {
// contains filtered or unexported fields
}
FooServiceCliOptions describes runtime configuration for test.patch.FooService cli
func NewFooServiceCliOptions ¶
func NewFooServiceCliOptions() *FooServiceCliOptions
NewFooServiceCliOptions initializes a new FooServiceCliOptions value
func (*FooServiceCliOptions) WithAfter ¶
func (opts *FooServiceCliOptions) WithAfter(fn func(*v2.Context) error) *FooServiceCliOptions
WithAfter injects a custom After hook to be run after any command invocation
func (*FooServiceCliOptions) WithBefore ¶
func (opts *FooServiceCliOptions) WithBefore(fn func(*v2.Context) error) *FooServiceCliOptions
WithBefore injects a custom Before hook to be run prior to any command invocation
func (*FooServiceCliOptions) WithClient ¶
func (opts *FooServiceCliOptions) WithClient(fn func(*v2.Context) (client.Client, error)) *FooServiceCliOptions
WithClient provides a Temporal client factory for use by commands
func (*FooServiceCliOptions) WithWorker ¶
func (opts *FooServiceCliOptions) WithWorker(fn func(*v2.Context, client.Client) (worker.Worker, error)) *FooServiceCliOptions
WithWorker provides an method for initializing a worker
type FooServiceClient ¶
type FooServiceClient interface {
// Foo executes a(n) test.patch.FooService.Foo workflow and blocks until error or response received
Foo(ctx context.Context, req *FooInput, opts ...*FooOptions) (*FooOutput, error)
// FooAsync starts a(n) test.patch.FooService.Foo workflow and returns a handle to the workflow run
FooAsync(ctx context.Context, req *FooInput, opts ...*FooOptions) (FooRun, error)
// GetFoo retrieves a handle to an existing test.patch.FooService.Foo workflow execution
GetFoo(ctx context.Context, workflowID string, runID string) FooRun
// CancelWorkflow requests cancellation of an existing workflow execution
CancelWorkflow(ctx context.Context, workflowID string, runID string) error
// TerminateWorkflow an existing workflow execution
TerminateWorkflow(ctx context.Context, workflowID string, runID string, reason string, details ...interface{}) error
}
FooServiceClient describes a client for a(n) test.patch.FooService worker
func NewFooServiceClient ¶
func NewFooServiceClient(c client.Client, options ...*fooServiceClientOptions) FooServiceClient
NewFooServiceClient initializes a new test.patch.FooService client
func NewFooServiceClientWithOptions ¶
func NewFooServiceClientWithOptions(c client.Client, opts client.Options, options ...*fooServiceClientOptions) (FooServiceClient, error)
NewFooServiceClientWithOptions initializes a new FooService client with the given options
type FooServiceWorkflowFunctions ¶
type FooServiceWorkflowFunctions interface {
// Foo executes a "test.patch.FooService.Foo" workflow inline
Foo(workflow.Context, *FooInput) (*FooOutput, error)
}
FooServiceWorkflowFunctions describes a mockable dependency for inlining workflows within other workflows
func NewFooServiceWorkflowFunctions ¶
func NewFooServiceWorkflowFunctions() FooServiceWorkflowFunctions
type FooServiceWorkflows ¶
type FooServiceWorkflows interface {
// Foo initializes a new a(n) FooWorkflow implementation
Foo(ctx workflow.Context, input *FooWorkflowInput) (FooWorkflow, error)
}
FooServiceWorkflows provides methods for initializing new test.patch.FooService workflow values
type FooWorkflow ¶
type FooWorkflow interface {
// Execute defines the entrypoint to a(n) test.patch.FooService.Foo workflow
Execute(ctx workflow.Context) (*FooOutput, error)
}
FooWorkflow describes a(n) test.patch.FooService.Foo workflow implementation
type FooWorkflowInput ¶
type FooWorkflowInput struct {
Req *FooInput
}
FooWorkflowInput describes the input to a(n) test.patch.FooService.Foo workflow constructor
func (*FooWorkflowInput) ContinueAsNew ¶ added in v1.20.0
func (i *FooWorkflowInput) ContinueAsNew(ctx workflow.Context, input *FooInput, options ...workflow.ContinueAsNewErrorOptions) (*FooOutput, error)
ContinueAsNew returns an appropriately configured ContinueAsNewError
type TestFooServiceClient ¶
type TestFooServiceClient struct {
// contains filtered or unexported fields
}
TestClient provides a testsuite-compatible Client
func NewTestFooServiceClient ¶
func NewTestFooServiceClient(env *testsuite.TestWorkflowEnvironment, workflows FooServiceWorkflows, activities FooServiceActivities) *TestFooServiceClient
NewTestFooServiceClient initializes a new TestFooServiceClient value
func (*TestFooServiceClient) CancelWorkflow ¶
func (c *TestFooServiceClient) CancelWorkflow(ctx context.Context, workflowID string, runID string) error
CancelWorkflow requests cancellation of an existing workflow execution
func (*TestFooServiceClient) Foo ¶
func (c *TestFooServiceClient) Foo(ctx context.Context, req *FooInput, opts ...*FooOptions) (*FooOutput, error)
Foo executes a(n) test.patch.FooService.Foo workflow in the test environment
func (*TestFooServiceClient) FooAsync ¶
func (c *TestFooServiceClient) FooAsync(ctx context.Context, req *FooInput, options ...*FooOptions) (FooRun, error)
FooAsync executes a(n) test.patch.FooService.Foo workflow in the test environment
func (*TestFooServiceClient) TerminateWorkflow ¶
func (c *TestFooServiceClient) TerminateWorkflow(ctx context.Context, workflowID string, runID string, reason string, details ...interface{}) error
TerminateWorkflow terminates an existing workflow execution