Documentation ¶
Overview ¶
Code generated by protoc-gen-go_temporal. DO NOT EDIT. versions:
protoc-gen-go_temporal 1.8.1-next (a780d91b8f008d31e60874f28b1dce86ebefabc2) go go1.21.6 protoc (unknown)
source: example/v1/example.proto
Index ¶
- Constants
- Variables
- func NewExampleCli(options ...*ExampleCliOptions) (*v2.App, error)
- func NewExampleCliCommand(options ...*ExampleCliOptions) (*v2.Command, error)
- func NewExternalCli(options ...*ExternalCliOptions) (*v2.App, error)
- func NewExternalCliCommand(options ...*ExternalCliOptions) (*v2.Command, error)
- func Notify(ctx workflow.Context, req *NotifyRequest, options ...*NotifyActivityOptions) error
- func NotifyLocal(ctx workflow.Context, req *NotifyRequest, ...) error
- func RegisterCreateFooWorkflow(r worker.WorkflowRegistry, ...)
- func RegisterExampleActivities(r worker.ActivityRegistry, activities ExampleActivities)
- func RegisterExampleWorkflows(r worker.WorkflowRegistry, workflows ExampleWorkflows)
- func RegisterExternalActivities(r worker.ActivityRegistry, activities ExternalActivities)
- func RegisterExternalWorkflows(r worker.WorkflowRegistry, workflows ExternalWorkflows)
- func RegisterNotifyActivity(r worker.ActivityRegistry, fn func(context.Context, *NotifyRequest) error)
- func RegisterProvisionFooWorkflow(r worker.WorkflowRegistry, ...)
- func SetFooProgressExternal(ctx workflow.Context, workflowID string, runID string, ...) error
- func SetFooProgressExternalAsync(ctx workflow.Context, workflowID string, runID string, ...) workflow.Future
- func WithExampleSchemeTypes() scheme.Option
- func WithExternalSchemeTypes() scheme.Option
- type CreateFooChildOptions
- type CreateFooChildRun
- func (r *CreateFooChildRun) Get(ctx workflow.Context) (*CreateFooResponse, error)
- func (r *CreateFooChildRun) Select(sel workflow.Selector, fn func(*CreateFooChildRun)) workflow.Selector
- func (r *CreateFooChildRun) SelectStart(sel workflow.Selector, fn func(*CreateFooChildRun)) workflow.Selector
- func (r *CreateFooChildRun) SetFooProgress(ctx workflow.Context, input *SetFooProgressRequest) error
- func (r *CreateFooChildRun) SetFooProgressAsync(ctx workflow.Context, input *SetFooProgressRequest) workflow.Future
- func (r *CreateFooChildRun) WaitStart(ctx workflow.Context) (*workflow.Execution, error)
- type CreateFooInput
- type CreateFooOptions
- type CreateFooResponse
- type CreateFooRun
- type CreateFooWorkflow
- type CreateFooWorkflowInput
- type ExampleActivities
- type ExampleCliOptions
- func (opts *ExampleCliOptions) WithAfter(fn func(*v2.Context) error) *ExampleCliOptions
- func (opts *ExampleCliOptions) WithBefore(fn func(*v2.Context) error) *ExampleCliOptions
- func (opts *ExampleCliOptions) WithClient(fn func(*v2.Context) (client.Client, error)) *ExampleCliOptions
- func (opts *ExampleCliOptions) WithWorker(fn func(*v2.Context, client.Client) (worker.Worker, error)) *ExampleCliOptions
- type ExampleClient
- type ExampleWorkflows
- type ExternalActivities
- type ExternalCliOptions
- func (opts *ExternalCliOptions) WithAfter(fn func(*v2.Context) error) *ExternalCliOptions
- func (opts *ExternalCliOptions) WithBefore(fn func(*v2.Context) error) *ExternalCliOptions
- func (opts *ExternalCliOptions) WithClient(fn func(*v2.Context) (client.Client, error)) *ExternalCliOptions
- func (opts *ExternalCliOptions) WithWorker(fn func(*v2.Context, client.Client) (worker.Worker, error)) *ExternalCliOptions
- type ExternalClient
- type ExternalWorkflows
- type Foo
- type Foo_Status
- type GetFooProgressResponse
- func (*GetFooProgressResponse) Descriptor() ([]byte, []int)deprecated
- func (x *GetFooProgressResponse) GetProgress() float32
- func (x *GetFooProgressResponse) GetStatus() Foo_Status
- func (*GetFooProgressResponse) ProtoMessage()
- func (x *GetFooProgressResponse) ProtoReflect() protoreflect.Message
- func (x *GetFooProgressResponse) Reset()
- func (x *GetFooProgressResponse) String() string
- type NotifyActivityOptions
- type NotifyFuture
- type NotifyLocalActivityOptions
- type NotifyRequest
- type ProvisionFooChildOptions
- type ProvisionFooChildRun
- func (r *ProvisionFooChildRun) Get(ctx workflow.Context) (*ProvisionFooResponse, error)
- func (r *ProvisionFooChildRun) Select(sel workflow.Selector, fn func(*ProvisionFooChildRun)) workflow.Selector
- func (r *ProvisionFooChildRun) SelectStart(sel workflow.Selector, fn func(*ProvisionFooChildRun)) workflow.Selector
- func (r *ProvisionFooChildRun) WaitStart(ctx workflow.Context) (*workflow.Execution, error)
- type ProvisionFooInput
- func (*ProvisionFooInput) Descriptor() ([]byte, []int)deprecated
- func (x *ProvisionFooInput) GetRequestName() string
- func (*ProvisionFooInput) ProtoMessage()
- func (x *ProvisionFooInput) ProtoReflect() protoreflect.Message
- func (x *ProvisionFooInput) Reset()
- func (x *ProvisionFooInput) String() string
- type ProvisionFooOptions
- type ProvisionFooResponse
- func (*ProvisionFooResponse) Descriptor() ([]byte, []int)deprecated
- func (x *ProvisionFooResponse) GetFoo() *Foo
- func (*ProvisionFooResponse) ProtoMessage()
- func (x *ProvisionFooResponse) ProtoReflect() protoreflect.Message
- func (x *ProvisionFooResponse) Reset()
- func (x *ProvisionFooResponse) String() string
- type ProvisionFooRun
- type ProvisionFooWorkflow
- type ProvisionFooWorkflowInput
- type SetFooProgressRequest
- func (*SetFooProgressRequest) Descriptor() ([]byte, []int)deprecated
- func (x *SetFooProgressRequest) GetProgress() float32
- func (*SetFooProgressRequest) ProtoMessage()
- func (x *SetFooProgressRequest) ProtoReflect() protoreflect.Message
- func (x *SetFooProgressRequest) Reset()
- func (x *SetFooProgressRequest) String() string
- type SetFooProgressSignal
- func (s *SetFooProgressSignal) Receive(ctx workflow.Context) (*SetFooProgressRequest, bool)
- func (s *SetFooProgressSignal) ReceiveAsync() *SetFooProgressRequest
- func (s *SetFooProgressSignal) ReceiveWithTimeout(ctx workflow.Context, timeout time.Duration) (resp *SetFooProgressRequest, ok bool, more bool)
- func (s *SetFooProgressSignal) Select(sel workflow.Selector, fn func(*SetFooProgressRequest)) workflow.Selector
- type TestExampleClient
- func (c *TestExampleClient) CancelWorkflow(ctx context.Context, workflowID string, runID string) error
- func (c *TestExampleClient) CreateFoo(ctx context.Context, req *CreateFooInput, opts ...*CreateFooOptions) (*CreateFooResponse, error)
- func (c *TestExampleClient) CreateFooAsync(ctx context.Context, req *CreateFooInput, options ...*CreateFooOptions) (CreateFooRun, error)
- func (c *TestExampleClient) CreateFooWithSetFooProgress(ctx context.Context, req *CreateFooInput, signal *SetFooProgressRequest, ...) (*CreateFooResponse, error)
- func (c *TestExampleClient) CreateFooWithSetFooProgressAsync(ctx context.Context, req *CreateFooInput, signal *SetFooProgressRequest, ...) (CreateFooRun, error)
- func (c *TestExampleClient) GetCreateFoo(ctx context.Context, workflowID string, runID string) CreateFooRun
- func (c *TestExampleClient) GetFooProgress(ctx context.Context, workflowID string, runID string) (*GetFooProgressResponse, error)
- func (c *TestExampleClient) GetUpdateFooProgress(ctx context.Context, req client.GetWorkflowUpdateHandleOptions) (UpdateFooProgressHandle, error)
- func (c *TestExampleClient) SetFooProgress(ctx context.Context, workflowID string, runID string, ...) error
- func (c *TestExampleClient) TerminateWorkflow(ctx context.Context, workflowID string, runID string, reason string, ...) error
- func (c *TestExampleClient) UpdateFooProgress(ctx context.Context, workflowID string, runID string, ...) (*GetFooProgressResponse, error)
- func (c *TestExampleClient) UpdateFooProgressAsync(ctx context.Context, workflowID string, runID string, ...) (UpdateFooProgressHandle, error)
- type TestExternalClient
- func (c *TestExternalClient) CancelWorkflow(ctx context.Context, workflowID string, runID string) error
- func (c *TestExternalClient) GetProvisionFoo(ctx context.Context, workflowID string, runID string) ProvisionFooRun
- func (c *TestExternalClient) ProvisionFoo(ctx context.Context, req *ProvisionFooInput, opts ...*ProvisionFooOptions) (*ProvisionFooResponse, error)
- func (c *TestExternalClient) ProvisionFooAsync(ctx context.Context, req *ProvisionFooInput, options ...*ProvisionFooOptions) (ProvisionFooRun, error)
- func (c *TestExternalClient) TerminateWorkflow(ctx context.Context, workflowID string, runID string, reason string, ...) error
- type UpdateFooProgressHandle
- type UpdateFooProgressOptions
Constants ¶
const (
CreateFooWorkflowName = "example.v1.Example.CreateFoo"
)
example.v1.Example workflow names
const ExampleTaskQueue = "example-v1"
ExampleTaskQueue= is the default task-queue for a example.v1.Example worker
const ExternalTaskQueue = "external-v1"
ExternalTaskQueue= is the default task-queue for a example.v1.External worker
const (
GetFooProgressQueryName = "example.v1.Example.GetFooProgress"
)
example.v1.Example query names
const (
NotifyActivityName = "example.v1.Example.Notify"
)
example.v1.Example activity names
const (
ProvisionFooWorkflowName = "example.v1.External.ProvisionFoo"
)
example.v1.External workflow names
const (
SetFooProgressSignalName = "example.v1.Example.SetFooProgress"
)
example.v1.Example signal names
const (
UpdateFooProgressUpdateName = "example.v1.Example.UpdateFooProgress"
)
example.v1.Example update names
Variables ¶
var ( Foo_Status_name = map[int32]string{ 0: "FOO_STATUS_UNSPECIFIED", 1: "FOO_STATUS_READY", 2: "FOO_STATUS_CREATING", } Foo_Status_value = map[string]int32{ "FOO_STATUS_UNSPECIFIED": 0, "FOO_STATUS_READY": 1, "FOO_STATUS_CREATING": 2, } )
Enum value maps for Foo_Status.
var ( // CreateFoo creates a new foo operation CreateFooFunction func(workflow.Context, *CreateFooInput) (*CreateFooResponse, error) )
Reference to generated workflow functions
var (
CreateFooIdexpression = expression.MustParseExpression("create-foo/${! name.slug() }")
)
example.v1.Example workflow id expressions
var (
CreateFooSearchAttributesMapping = expression.MustParseMapping("foo = name\ncreated_at = now().ts_tz(\"UTC\")\n")
)
example.v1.Example workflow search attribute mappings
var File_example_v1_example_proto protoreflect.FileDescriptor
var ( // ProvisionFooFunction implements a "ProvisionFooWorkflow" workflow ProvisionFooFunction func(workflow.Context, *ProvisionFooInput) (*ProvisionFooResponse, error) )
Reference to generated workflow functions
var (
ProvisionFooIdexpression = expression.MustParseExpression("provision-foo/${! name.slug() }")
)
example.v1.External workflow id expressions
var (
UpdateFooProgressIdexpression = expression.MustParseExpression("update-progress/${! progress.string() }")
)
example.v1.Example update id expressions
Functions ¶
func NewExampleCli ¶
func NewExampleCli(options ...*ExampleCliOptions) (*v2.App, error)
NewExampleCli initializes a cli for a(n) example.v1.Example service
func NewExampleCliCommand ¶
func NewExampleCliCommand(options ...*ExampleCliOptions) (*v2.Command, error)
NewExampleCliCommand initializes a cli command for a example.v1.Example service with subcommands for each query, signal, update, and workflow
func NewExternalCli ¶ added in v1.5.0
func NewExternalCli(options ...*ExternalCliOptions) (*v2.App, error)
NewExternalCli initializes a cli for a(n) example.v1.External service
func NewExternalCliCommand ¶ added in v1.5.0
func NewExternalCliCommand(options ...*ExternalCliOptions) (*v2.Command, error)
NewExternalCliCommand initializes a cli command for a example.v1.External service with subcommands for each query, signal, update, and workflow
func Notify ¶
func Notify(ctx workflow.Context, req *NotifyRequest, options ...*NotifyActivityOptions) error
Notify sends a notification
func NotifyLocal ¶
func NotifyLocal(ctx workflow.Context, req *NotifyRequest, options ...*NotifyLocalActivityOptions) error
Notify sends a notification (locally)
func RegisterCreateFooWorkflow ¶
func RegisterCreateFooWorkflow(r worker.WorkflowRegistry, wf func(workflow.Context, *CreateFooWorkflowInput) (CreateFooWorkflow, error))
RegisterCreateFooWorkflow registers a example.v1.Example.CreateFoo workflow with the given worker
func RegisterExampleActivities ¶
func RegisterExampleActivities(r worker.ActivityRegistry, activities ExampleActivities)
RegisterExampleActivities registers activities with a worker
func RegisterExampleWorkflows ¶
func RegisterExampleWorkflows(r worker.WorkflowRegistry, workflows ExampleWorkflows)
CreateFoo creates a new foo operation RegisterExampleWorkflows registers example.v1.Example workflows with the given worker
func RegisterExternalActivities ¶ added in v1.5.0
func RegisterExternalActivities(r worker.ActivityRegistry, activities ExternalActivities)
RegisterExternalActivities registers activities with a worker
func RegisterExternalWorkflows ¶ added in v1.5.0
func RegisterExternalWorkflows(r worker.WorkflowRegistry, workflows ExternalWorkflows)
ProvisionFoo initializes a new a(n) ProvisionFooWorkflow implementation RegisterExternalWorkflows registers example.v1.External workflows with the given worker
func RegisterNotifyActivity ¶
func RegisterNotifyActivity(r worker.ActivityRegistry, fn func(context.Context, *NotifyRequest) error)
RegisterNotifyActivity registers a example.v1.Example.Notify activity
func RegisterProvisionFooWorkflow ¶ added in v1.5.0
func RegisterProvisionFooWorkflow(r worker.WorkflowRegistry, wf func(workflow.Context, *ProvisionFooWorkflowInput) (ProvisionFooWorkflow, error))
RegisterProvisionFooWorkflow registers a example.v1.External.ProvisionFoo workflow with the given worker
func SetFooProgressExternal ¶
func SetFooProgressExternal(ctx workflow.Context, workflowID string, runID string, req *SetFooProgressRequest) error
SetFooProgressExternal sends a(n) example.v1.Example.SetFooProgress signal to an existing workflow
func SetFooProgressExternalAsync ¶
func SetFooProgressExternalAsync(ctx workflow.Context, workflowID string, runID string, req *SetFooProgressRequest) workflow.Future
SetFooProgressExternalAsync sends a(n) example.v1.Example.SetFooProgress signal to an existing workflow
func WithExampleSchemeTypes ¶ added in v1.7.0
WithExampleSchemeTypes registers all Example protobuf types with the given scheme
func WithExternalSchemeTypes ¶ added in v1.7.0
WithExternalSchemeTypes registers all External protobuf types with the given scheme
Types ¶
type CreateFooChildOptions ¶
type CreateFooChildOptions struct {
// contains filtered or unexported fields
}
CreateFooChildOptions provides configuration for a example.v1.Example.CreateFoo workflow operation
func NewCreateFooChildOptions ¶
func NewCreateFooChildOptions() *CreateFooChildOptions
NewCreateFooChildOptions initializes a new CreateFooChildOptions value
func (*CreateFooChildOptions) WithChildWorkflowOptions ¶
func (opts *CreateFooChildOptions) WithChildWorkflowOptions(options workflow.ChildWorkflowOptions) *CreateFooChildOptions
WithChildWorkflowOptions sets the initial client.StartWorkflowOptions
type CreateFooChildRun ¶
type CreateFooChildRun struct {
Future workflow.ChildWorkflowFuture
}
CreateFooChildRun describes a child example.v1.Example.CreateFoo workflow run
func CreateFooChildAsync ¶
func CreateFooChildAsync(ctx workflow.Context, req *CreateFooInput, options ...*CreateFooChildOptions) (*CreateFooChildRun, error)
CreateFooChildAsync executes a child example.v1.Example.CreateFoo workflow
func (*CreateFooChildRun) Get ¶
func (r *CreateFooChildRun) Get(ctx workflow.Context) (*CreateFooResponse, error)
Get blocks until the workflow is completed, returning the response value
func (*CreateFooChildRun) Select ¶
func (r *CreateFooChildRun) Select(sel workflow.Selector, fn func(*CreateFooChildRun)) workflow.Selector
Select adds this completion to the selector. Callback can be nil.
func (*CreateFooChildRun) SelectStart ¶
func (r *CreateFooChildRun) SelectStart(sel workflow.Selector, fn func(*CreateFooChildRun)) workflow.Selector
SelectStart adds waiting for start to the selector. Callback can be nil.
func (*CreateFooChildRun) SetFooProgress ¶
func (r *CreateFooChildRun) SetFooProgress(ctx workflow.Context, input *SetFooProgressRequest) error
SetFooProgress sends a(n) "example.v1.Example.SetFooProgress" signal request to the child workflow
func (*CreateFooChildRun) SetFooProgressAsync ¶
func (r *CreateFooChildRun) SetFooProgressAsync(ctx workflow.Context, input *SetFooProgressRequest) workflow.Future
SetFooProgressAsync sends a(n) "example.v1.Example.SetFooProgress" signal request to the child workflow
type CreateFooInput ¶
type CreateFooInput struct { // unique foo name RequestName string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` // contains filtered or unexported fields }
CreateFooInput describes the input to a CreateFoo workflow
func UnmarshalCliFlagsToCreateFooInput ¶ added in v1.3.0
func UnmarshalCliFlagsToCreateFooInput(cmd *v2.Context) (*CreateFooInput, error)
UnmarshalCliFlagsToCreateFooInput unmarshals a CreateFooInput from command line flags
func (*CreateFooInput) Descriptor
deprecated
added in
v1.3.0
func (*CreateFooInput) Descriptor() ([]byte, []int)
Deprecated: Use CreateFooRequest.ProtoReflect.Descriptor instead.
func (*CreateFooInput) GetRequestName ¶ added in v1.3.0
func (x *CreateFooInput) GetRequestName() string
func (*CreateFooInput) ProtoMessage ¶ added in v1.3.0
func (*CreateFooInput) ProtoMessage()
func (*CreateFooInput) ProtoReflect ¶ added in v1.3.0
func (x *CreateFooInput) ProtoReflect() protoreflect.Message
func (*CreateFooInput) Reset ¶ added in v1.3.0
func (x *CreateFooInput) Reset()
func (*CreateFooInput) String ¶ added in v1.3.0
func (x *CreateFooInput) String() string
type CreateFooOptions ¶
type CreateFooOptions struct {
// contains filtered or unexported fields
}
CreateFooOptions provides configuration for a example.v1.Example.CreateFoo workflow operation
func NewCreateFooOptions ¶
func NewCreateFooOptions() *CreateFooOptions
NewCreateFooOptions initializes a new CreateFooOptions value
func (*CreateFooOptions) WithStartWorkflowOptions ¶
func (opts *CreateFooOptions) WithStartWorkflowOptions(options client.StartWorkflowOptions) *CreateFooOptions
WithStartWorkflowOptions sets the initial client.StartWorkflowOptions
type CreateFooResponse ¶
type CreateFooResponse struct { Foo *Foo `protobuf:"bytes,1,opt,name=foo,proto3" json:"foo,omitempty"` // contains filtered or unexported fields }
SampleWorkflowWithMutexResponse describes the output from a CreateFoo workflow
func CreateFooChild ¶
func CreateFooChild(ctx workflow.Context, req *CreateFooInput, options ...*CreateFooChildOptions) (*CreateFooResponse, error)
CreateFooChild executes a child example.v1.Example.CreateFoo workflow
func (*CreateFooResponse) Descriptor
deprecated
func (*CreateFooResponse) Descriptor() ([]byte, []int)
Deprecated: Use CreateFooResponse.ProtoReflect.Descriptor instead.
func (*CreateFooResponse) GetFoo ¶
func (x *CreateFooResponse) GetFoo() *Foo
func (*CreateFooResponse) ProtoMessage ¶
func (*CreateFooResponse) ProtoMessage()
func (*CreateFooResponse) ProtoReflect ¶
func (x *CreateFooResponse) ProtoReflect() protoreflect.Message
func (*CreateFooResponse) Reset ¶
func (x *CreateFooResponse) Reset()
func (*CreateFooResponse) String ¶
func (x *CreateFooResponse) String() string
type CreateFooRun ¶
type CreateFooRun 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) (*CreateFooResponse, 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 /* GetFooProgress returns the status of a CreateFoo operation */ GetFooProgress(ctx context.Context) (*GetFooProgressResponse, error) /* SetFooProgress sets the current status of a CreateFoo operation */ SetFooProgress(ctx context.Context, req *SetFooProgressRequest) error /* UpdateFooProgress sets the current status of a CreateFoo operation */ UpdateFooProgress(ctx context.Context, req *SetFooProgressRequest, opts ...*UpdateFooProgressOptions) (*GetFooProgressResponse, error) // UpdateFooProgressAsync sends a(n) example.v1.Example.UpdateFooProgress update to the workflow UpdateFooProgressAsync(ctx context.Context, req *SetFooProgressRequest, opts ...*UpdateFooProgressOptions) (UpdateFooProgressHandle, error) }
CreateFooRun describes a(n) example.v1.Example.CreateFoo workflow run
type CreateFooWorkflow ¶
type CreateFooWorkflow interface { // CreateFoo creates a new foo operation Execute(ctx workflow.Context) (*CreateFooResponse, error) // GetFooProgress returns the status of a CreateFoo operation GetFooProgress() (*GetFooProgressResponse, error) // UpdateFooProgress sets the current status of a CreateFoo operation UpdateFooProgress(workflow.Context, *SetFooProgressRequest) (*GetFooProgressResponse, error) }
CreateFoo creates a new foo operation
type CreateFooWorkflowInput ¶ added in v1.3.0
type CreateFooWorkflowInput struct { Req *CreateFooInput SetFooProgress *SetFooProgressSignal }
CreateFooWorkflowInput describes the input to a(n) example.v1.Example.CreateFoo workflow constructor
type ExampleActivities ¶
type ExampleActivities interface { // Notify sends a notification Notify(ctx context.Context, req *NotifyRequest) error }
ExampleActivities describes available worker activities
type ExampleCliOptions ¶
type ExampleCliOptions struct {
// contains filtered or unexported fields
}
ExampleCliOptions describes runtime configuration for example.v1.Example cli
func NewExampleCliOptions ¶
func NewExampleCliOptions() *ExampleCliOptions
NewExampleCliOptions initializes a new ExampleCliOptions value
func (*ExampleCliOptions) WithAfter ¶
func (opts *ExampleCliOptions) WithAfter(fn func(*v2.Context) error) *ExampleCliOptions
WithAfter injects a custom After hook to be run after any command invocation
func (*ExampleCliOptions) WithBefore ¶
func (opts *ExampleCliOptions) WithBefore(fn func(*v2.Context) error) *ExampleCliOptions
WithBefore injects a custom Before hook to be run prior to any command invocation
func (*ExampleCliOptions) WithClient ¶
func (opts *ExampleCliOptions) WithClient(fn func(*v2.Context) (client.Client, error)) *ExampleCliOptions
WithClient provides a Temporal client factory for use by commands
func (*ExampleCliOptions) WithWorker ¶
func (opts *ExampleCliOptions) WithWorker(fn func(*v2.Context, client.Client) (worker.Worker, error)) *ExampleCliOptions
WithWorker provides an method for initializing a worker
type ExampleClient ¶
type ExampleClient interface { // CreateFoo creates a new foo operation CreateFoo(ctx context.Context, req *CreateFooInput, opts ...*CreateFooOptions) (*CreateFooResponse, error) // CreateFooAsync executes a(n) example.v1.Example.CreateFoo workflow asynchronously CreateFooAsync(ctx context.Context, req *CreateFooInput, opts ...*CreateFooOptions) (CreateFooRun, error) // GetCreateFoo retrieves a handle to an existing example.v1.Example.CreateFoo workflow execution GetCreateFoo(ctx context.Context, workflowID string, runID string) CreateFooRun // CreateFooWithSetFooProgress sends a(n) example.v1.Example.SetFooProgress signal to a(n) example.v1.Example.CreateFoo workflow, starting it if necessary, and blocks until workflow completion CreateFooWithSetFooProgress(ctx context.Context, req *CreateFooInput, signal *SetFooProgressRequest, opts ...*CreateFooOptions) (*CreateFooResponse, error) // CreateFooWithSetFooProgressAsync sends a(n) example.v1.Example.SetFooProgress signal to a(n) example.v1.Example.CreateFoo workflow, starting it if necessary, and returns a handle to the workflow execution CreateFooWithSetFooProgressAsync(ctx context.Context, req *CreateFooInput, signal *SetFooProgressRequest, opts ...*CreateFooOptions) (CreateFooRun, error) // 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 /* GetFooProgress returns the status of a CreateFoo operation */ GetFooProgress(ctx context.Context, workflowID string, runID string) (*GetFooProgressResponse, error) /* SetFooProgress sets the current status of a CreateFoo operation */ SetFooProgress(ctx context.Context, workflowID string, runID string, signal *SetFooProgressRequest) error /* UpdateFooProgress sets the current status of a CreateFoo operation */ UpdateFooProgress(ctx context.Context, workflowID string, runID string, req *SetFooProgressRequest, opts ...*UpdateFooProgressOptions) (*GetFooProgressResponse, error) /* UpdateFooProgress sets the current status of a CreateFoo operation */ UpdateFooProgressAsync(ctx context.Context, workflowID string, runID string, req *SetFooProgressRequest, opts ...*UpdateFooProgressOptions) (UpdateFooProgressHandle, error) // UpdateFooProgress retrieves a handle to an existing example.v1.Example.UpdateFooProgress update GetUpdateFooProgress(ctx context.Context, req client.GetWorkflowUpdateHandleOptions) (UpdateFooProgressHandle, error) }
ExampleClient describes a client for a(n) example.v1.Example worker
func NewExampleClient ¶
func NewExampleClient(c client.Client) ExampleClient
NewExampleClient initializes a new example.v1.Example client
func NewExampleClientWithOptions ¶
NewExampleClientWithOptions initializes a new Example client with the given options
type ExampleWorkflows ¶
type ExampleWorkflows interface {
CreateFoo(ctx workflow.Context, input *CreateFooWorkflowInput) (CreateFooWorkflow, error)
}
ExampleWorkflows provides methods for initializing new example.v1.Example workflow values
type ExternalActivities ¶ added in v1.5.0
type ExternalActivities interface{}
ExternalActivities describes available worker activities
type ExternalCliOptions ¶ added in v1.5.0
type ExternalCliOptions struct {
// contains filtered or unexported fields
}
ExternalCliOptions describes runtime configuration for example.v1.External cli
func NewExternalCliOptions ¶ added in v1.5.0
func NewExternalCliOptions() *ExternalCliOptions
NewExternalCliOptions initializes a new ExternalCliOptions value
func (*ExternalCliOptions) WithAfter ¶ added in v1.5.0
func (opts *ExternalCliOptions) WithAfter(fn func(*v2.Context) error) *ExternalCliOptions
WithAfter injects a custom After hook to be run after any command invocation
func (*ExternalCliOptions) WithBefore ¶ added in v1.5.0
func (opts *ExternalCliOptions) WithBefore(fn func(*v2.Context) error) *ExternalCliOptions
WithBefore injects a custom Before hook to be run prior to any command invocation
func (*ExternalCliOptions) WithClient ¶ added in v1.5.0
func (opts *ExternalCliOptions) WithClient(fn func(*v2.Context) (client.Client, error)) *ExternalCliOptions
WithClient provides a Temporal client factory for use by commands
func (*ExternalCliOptions) WithWorker ¶ added in v1.5.0
func (opts *ExternalCliOptions) WithWorker(fn func(*v2.Context, client.Client) (worker.Worker, error)) *ExternalCliOptions
WithWorker provides an method for initializing a worker
type ExternalClient ¶ added in v1.5.0
type ExternalClient interface { // ProvisionFoo executes a(n) example.v1.External.ProvisionFoo workflow and blocks until error or response received ProvisionFoo(ctx context.Context, req *ProvisionFooInput, opts ...*ProvisionFooOptions) (*ProvisionFooResponse, error) // ProvisionFooAsync executes a(n) example.v1.External.ProvisionFoo workflow asynchronously ProvisionFooAsync(ctx context.Context, req *ProvisionFooInput, opts ...*ProvisionFooOptions) (ProvisionFooRun, error) // GetProvisionFoo retrieves a handle to an existing example.v1.External.ProvisionFoo workflow execution GetProvisionFoo(ctx context.Context, workflowID string, runID string) ProvisionFooRun // 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 }
ExternalClient describes a client for a(n) example.v1.External worker
func NewExternalClient ¶ added in v1.5.0
func NewExternalClient(c client.Client) ExternalClient
NewExternalClient initializes a new example.v1.External client
func NewExternalClientWithOptions ¶ added in v1.5.0
NewExternalClientWithOptions initializes a new External client with the given options
type ExternalWorkflows ¶ added in v1.5.0
type ExternalWorkflows interface {
ProvisionFoo(ctx workflow.Context, input *ProvisionFooWorkflowInput) (ProvisionFooWorkflow, error)
}
ExternalWorkflows provides methods for initializing new example.v1.External workflow values
type Foo ¶
type Foo struct { Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` Status Foo_Status `protobuf:"varint,2,opt,name=status,proto3,enum=example.v1.Foo_Status" json:"status,omitempty"` // contains filtered or unexported fields }
Foo describes an illustrative foo resource
func (*Foo) Descriptor
deprecated
func (*Foo) GetStatus ¶
func (x *Foo) GetStatus() Foo_Status
func (*Foo) ProtoMessage ¶
func (*Foo) ProtoMessage()
func (*Foo) ProtoReflect ¶
func (x *Foo) ProtoReflect() protoreflect.Message
type Foo_Status ¶
type Foo_Status int32
const ( Foo_FOO_STATUS_UNSPECIFIED Foo_Status = 0 Foo_FOO_STATUS_READY Foo_Status = 1 Foo_FOO_STATUS_CREATING Foo_Status = 2 )
func (Foo_Status) Descriptor ¶
func (Foo_Status) Descriptor() protoreflect.EnumDescriptor
func (Foo_Status) Enum ¶
func (x Foo_Status) Enum() *Foo_Status
func (Foo_Status) EnumDescriptor
deprecated
func (Foo_Status) EnumDescriptor() ([]byte, []int)
Deprecated: Use Foo_Status.Descriptor instead.
func (Foo_Status) Number ¶
func (x Foo_Status) Number() protoreflect.EnumNumber
func (Foo_Status) String ¶
func (x Foo_Status) String() string
func (Foo_Status) Type ¶
func (Foo_Status) Type() protoreflect.EnumType
type GetFooProgressResponse ¶
type GetFooProgressResponse struct { Progress float32 `protobuf:"fixed32,1,opt,name=progress,proto3" json:"progress,omitempty"` Status Foo_Status `protobuf:"varint,2,opt,name=status,proto3,enum=example.v1.Foo_Status" json:"status,omitempty"` // contains filtered or unexported fields }
GetFooProgressResponse describes the output from a GetFooProgress query
func (*GetFooProgressResponse) Descriptor
deprecated
func (*GetFooProgressResponse) Descriptor() ([]byte, []int)
Deprecated: Use GetFooProgressResponse.ProtoReflect.Descriptor instead.
func (*GetFooProgressResponse) GetProgress ¶
func (x *GetFooProgressResponse) GetProgress() float32
func (*GetFooProgressResponse) GetStatus ¶
func (x *GetFooProgressResponse) GetStatus() Foo_Status
func (*GetFooProgressResponse) ProtoMessage ¶
func (*GetFooProgressResponse) ProtoMessage()
func (*GetFooProgressResponse) ProtoReflect ¶
func (x *GetFooProgressResponse) ProtoReflect() protoreflect.Message
func (*GetFooProgressResponse) Reset ¶
func (x *GetFooProgressResponse) Reset()
func (*GetFooProgressResponse) String ¶
func (x *GetFooProgressResponse) String() string
type NotifyActivityOptions ¶
type NotifyActivityOptions struct {
// contains filtered or unexported fields
}
NotifyActivityOptions provides configuration for a(n) example.v1.Example.Notify activity
func NewNotifyActivityOptions ¶
func NewNotifyActivityOptions() *NotifyActivityOptions
NewNotifyActivityOptions sets default ActivityOptions
func (*NotifyActivityOptions) WithActivityOptions ¶
func (opts *NotifyActivityOptions) WithActivityOptions(options workflow.ActivityOptions) *NotifyActivityOptions
WithActivityOptions sets default ActivityOptions
type NotifyFuture ¶
NotifyFuture describes a(n) example.v1.Example.Notify activity execution
func NotifyAsync ¶
func NotifyAsync(ctx workflow.Context, req *NotifyRequest, options ...*NotifyActivityOptions) *NotifyFuture
Notify sends a notification (asynchronously)
func NotifyLocalAsync ¶
func NotifyLocalAsync(ctx workflow.Context, req *NotifyRequest, options ...*NotifyLocalActivityOptions) *NotifyFuture
Notify sends a notification (asynchronously, locally)
func (*NotifyFuture) Get ¶
func (f *NotifyFuture) Get(ctx workflow.Context) error
Get blocks on the activity's completion, returning the response
func (*NotifyFuture) Select ¶
func (f *NotifyFuture) Select(sel workflow.Selector, fn func(*NotifyFuture)) workflow.Selector
Select adds the activity's completion to the selector, callback can be nil
type NotifyLocalActivityOptions ¶
type NotifyLocalActivityOptions struct {
// contains filtered or unexported fields
}
NotifyLocalActivityOptions provides configuration for a local example.v1.Example.Notify activity
func NewNotifyLocalActivityOptions ¶
func NewNotifyLocalActivityOptions() *NotifyLocalActivityOptions
NewNotifyLocalActivityOptions sets default LocalActivityOptions
func (*NotifyLocalActivityOptions) Local ¶
func (opts *NotifyLocalActivityOptions) Local(fn func(context.Context, *NotifyRequest) error) *NotifyLocalActivityOptions
Local provides a local example.v1.Example.Notify activity implementation
func (*NotifyLocalActivityOptions) WithLocalActivityOptions ¶
func (opts *NotifyLocalActivityOptions) WithLocalActivityOptions(options workflow.LocalActivityOptions) *NotifyLocalActivityOptions
WithLocalActivityOptions sets default LocalActivityOptions
type NotifyRequest ¶
type NotifyRequest struct { Message string `protobuf:"bytes,1,opt,name=message,proto3" json:"message,omitempty"` // contains filtered or unexported fields }
NotifyRequest describes the input to a Notify activity
func (*NotifyRequest) Descriptor
deprecated
func (*NotifyRequest) Descriptor() ([]byte, []int)
Deprecated: Use NotifyRequest.ProtoReflect.Descriptor instead.
func (*NotifyRequest) GetMessage ¶
func (x *NotifyRequest) GetMessage() string
func (*NotifyRequest) ProtoMessage ¶
func (*NotifyRequest) ProtoMessage()
func (*NotifyRequest) ProtoReflect ¶
func (x *NotifyRequest) ProtoReflect() protoreflect.Message
func (*NotifyRequest) Reset ¶
func (x *NotifyRequest) Reset()
func (*NotifyRequest) String ¶
func (x *NotifyRequest) String() string
type ProvisionFooChildOptions ¶ added in v1.5.0
type ProvisionFooChildOptions struct {
// contains filtered or unexported fields
}
ProvisionFooChildOptions provides configuration for a example.v1.External.ProvisionFoo workflow operation
func NewProvisionFooChildOptions ¶ added in v1.5.0
func NewProvisionFooChildOptions() *ProvisionFooChildOptions
NewProvisionFooChildOptions initializes a new ProvisionFooChildOptions value
func (*ProvisionFooChildOptions) WithChildWorkflowOptions ¶ added in v1.5.0
func (opts *ProvisionFooChildOptions) WithChildWorkflowOptions(options workflow.ChildWorkflowOptions) *ProvisionFooChildOptions
WithChildWorkflowOptions sets the initial client.StartWorkflowOptions
type ProvisionFooChildRun ¶ added in v1.5.0
type ProvisionFooChildRun struct {
Future workflow.ChildWorkflowFuture
}
ProvisionFooChildRun describes a child example.v1.External.ProvisionFoo workflow run
func ProvisionFooChildAsync ¶ added in v1.5.0
func ProvisionFooChildAsync(ctx workflow.Context, req *ProvisionFooInput, options ...*ProvisionFooChildOptions) (*ProvisionFooChildRun, error)
ProvisionFooChildAsync executes a child example.v1.External.ProvisionFoo workflow
func (*ProvisionFooChildRun) Get ¶ added in v1.5.0
func (r *ProvisionFooChildRun) Get(ctx workflow.Context) (*ProvisionFooResponse, error)
Get blocks until the workflow is completed, returning the response value
func (*ProvisionFooChildRun) Select ¶ added in v1.5.0
func (r *ProvisionFooChildRun) Select(sel workflow.Selector, fn func(*ProvisionFooChildRun)) workflow.Selector
Select adds this completion to the selector. Callback can be nil.
func (*ProvisionFooChildRun) SelectStart ¶ added in v1.5.0
func (r *ProvisionFooChildRun) SelectStart(sel workflow.Selector, fn func(*ProvisionFooChildRun)) workflow.Selector
SelectStart adds waiting for start to the selector. Callback can be nil.
type ProvisionFooInput ¶ added in v1.5.0
type ProvisionFooInput struct { // unique foo name RequestName string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` // contains filtered or unexported fields }
ProvisionFooInput describes the input to a ProvisionFoo workflow
func UnmarshalCliFlagsToProvisionFooInput ¶ added in v1.5.0
func UnmarshalCliFlagsToProvisionFooInput(cmd *v2.Context) (*ProvisionFooInput, error)
UnmarshalCliFlagsToProvisionFooInput unmarshals a ProvisionFooInput from command line flags
func (*ProvisionFooInput) Descriptor
deprecated
added in
v1.5.0
func (*ProvisionFooInput) Descriptor() ([]byte, []int)
Deprecated: Use ProvisionFooRequest.ProtoReflect.Descriptor instead.
func (*ProvisionFooInput) GetRequestName ¶ added in v1.5.0
func (x *ProvisionFooInput) GetRequestName() string
func (*ProvisionFooInput) ProtoMessage ¶ added in v1.5.0
func (*ProvisionFooInput) ProtoMessage()
func (*ProvisionFooInput) ProtoReflect ¶ added in v1.5.0
func (x *ProvisionFooInput) ProtoReflect() protoreflect.Message
func (*ProvisionFooInput) Reset ¶ added in v1.5.0
func (x *ProvisionFooInput) Reset()
func (*ProvisionFooInput) String ¶ added in v1.5.0
func (x *ProvisionFooInput) String() string
type ProvisionFooOptions ¶ added in v1.5.0
type ProvisionFooOptions struct {
// contains filtered or unexported fields
}
ProvisionFooOptions provides configuration for a example.v1.External.ProvisionFoo workflow operation
func NewProvisionFooOptions ¶ added in v1.5.0
func NewProvisionFooOptions() *ProvisionFooOptions
NewProvisionFooOptions initializes a new ProvisionFooOptions value
func (*ProvisionFooOptions) WithStartWorkflowOptions ¶ added in v1.5.0
func (opts *ProvisionFooOptions) WithStartWorkflowOptions(options client.StartWorkflowOptions) *ProvisionFooOptions
WithStartWorkflowOptions sets the initial client.StartWorkflowOptions
type ProvisionFooResponse ¶ added in v1.5.0
type ProvisionFooResponse struct { Foo *Foo `protobuf:"bytes,1,opt,name=foo,proto3" json:"foo,omitempty"` // contains filtered or unexported fields }
SampleWorkflowWithMutexResponse describes the output from a ProvisionFoo workflow
func ProvisionFooChild ¶ added in v1.5.0
func ProvisionFooChild(ctx workflow.Context, req *ProvisionFooInput, options ...*ProvisionFooChildOptions) (*ProvisionFooResponse, error)
ProvisionFooChild executes a child example.v1.External.ProvisionFoo workflow
func (*ProvisionFooResponse) Descriptor
deprecated
added in
v1.5.0
func (*ProvisionFooResponse) Descriptor() ([]byte, []int)
Deprecated: Use ProvisionFooResponse.ProtoReflect.Descriptor instead.
func (*ProvisionFooResponse) GetFoo ¶ added in v1.5.0
func (x *ProvisionFooResponse) GetFoo() *Foo
func (*ProvisionFooResponse) ProtoMessage ¶ added in v1.5.0
func (*ProvisionFooResponse) ProtoMessage()
func (*ProvisionFooResponse) ProtoReflect ¶ added in v1.5.0
func (x *ProvisionFooResponse) ProtoReflect() protoreflect.Message
func (*ProvisionFooResponse) Reset ¶ added in v1.5.0
func (x *ProvisionFooResponse) Reset()
func (*ProvisionFooResponse) String ¶ added in v1.5.0
func (x *ProvisionFooResponse) String() string
type ProvisionFooRun ¶ added in v1.5.0
type ProvisionFooRun 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) (*ProvisionFooResponse, 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 }
ProvisionFooRun describes a(n) example.v1.External.ProvisionFoo workflow run
type ProvisionFooWorkflow ¶ added in v1.5.0
type ProvisionFooWorkflow interface { // Execute defines the entrypoint to a(n) example.v1.External.ProvisionFoo workflow Execute(ctx workflow.Context) (*ProvisionFooResponse, error) }
ProvisionFooWorkflow describes a(n) example.v1.External.ProvisionFoo workflow implementation
type ProvisionFooWorkflowInput ¶ added in v1.5.0
type ProvisionFooWorkflowInput struct {
Req *ProvisionFooInput
}
ProvisionFooWorkflowInput describes the input to a(n) example.v1.External.ProvisionFoo workflow constructor
type SetFooProgressRequest ¶
type SetFooProgressRequest struct { // value of current workflow progress Progress float32 `protobuf:"fixed32,1,opt,name=progress,proto3" json:"progress,omitempty"` // contains filtered or unexported fields }
SetFooProgressRequest describes the input to a SetFooProgress signal
func UnmarshalCliFlagsToSetFooProgressRequest ¶ added in v1.2.0
func UnmarshalCliFlagsToSetFooProgressRequest(cmd *v2.Context) (*SetFooProgressRequest, error)
UnmarshalCliFlagsToSetFooProgressRequest unmarshals a SetFooProgressRequest from command line flags
func (*SetFooProgressRequest) Descriptor
deprecated
func (*SetFooProgressRequest) Descriptor() ([]byte, []int)
Deprecated: Use SetFooProgressRequest.ProtoReflect.Descriptor instead.
func (*SetFooProgressRequest) GetProgress ¶
func (x *SetFooProgressRequest) GetProgress() float32
func (*SetFooProgressRequest) ProtoMessage ¶
func (*SetFooProgressRequest) ProtoMessage()
func (*SetFooProgressRequest) ProtoReflect ¶
func (x *SetFooProgressRequest) ProtoReflect() protoreflect.Message
func (*SetFooProgressRequest) Reset ¶
func (x *SetFooProgressRequest) Reset()
func (*SetFooProgressRequest) String ¶
func (x *SetFooProgressRequest) String() string
type SetFooProgressSignal ¶
type SetFooProgressSignal struct {
Channel workflow.ReceiveChannel
}
SetFooProgressSignal describes a(n) example.v1.Example.SetFooProgress signal
func (*SetFooProgressSignal) Receive ¶
func (s *SetFooProgressSignal) Receive(ctx workflow.Context) (*SetFooProgressRequest, bool)
Receive blocks until a(n) example.v1.Example.SetFooProgress signal is received
func (*SetFooProgressSignal) ReceiveAsync ¶
func (s *SetFooProgressSignal) ReceiveAsync() *SetFooProgressRequest
ReceiveAsync checks for a example.v1.Example.SetFooProgress signal without blocking
func (*SetFooProgressSignal) ReceiveWithTimeout ¶ added in v1.6.0
func (s *SetFooProgressSignal) ReceiveWithTimeout(ctx workflow.Context, timeout time.Duration) (resp *SetFooProgressRequest, ok bool, more bool)
ReceiveWithTimeout blocks until a(n) example.v1.Example.SetFooProgress signal is received or timeout expires. Returns more value of false when Channel is closed. Returns ok value of false when no value was found in the channel for the duration of timeout or the ctx was canceled. resp will be nil if ok is false.
func (*SetFooProgressSignal) Select ¶
func (s *SetFooProgressSignal) Select(sel workflow.Selector, fn func(*SetFooProgressRequest)) workflow.Selector
Select checks for a(n) example.v1.Example.SetFooProgress signal without blocking
type TestExampleClient ¶
type TestExampleClient struct {
// contains filtered or unexported fields
}
TestClient provides a testsuite-compatible Client
func NewTestExampleClient ¶
func NewTestExampleClient(env *testsuite.TestWorkflowEnvironment, workflows ExampleWorkflows, activities ExampleActivities) *TestExampleClient
NewTestExampleClient initializes a new TestExampleClient value
func (*TestExampleClient) CancelWorkflow ¶
func (c *TestExampleClient) CancelWorkflow(ctx context.Context, workflowID string, runID string) error
CancelWorkflow requests cancellation of an existing workflow execution
func (*TestExampleClient) CreateFoo ¶
func (c *TestExampleClient) CreateFoo(ctx context.Context, req *CreateFooInput, opts ...*CreateFooOptions) (*CreateFooResponse, error)
CreateFoo executes a(n) CreateFoo workflow in the test environment
func (*TestExampleClient) CreateFooAsync ¶
func (c *TestExampleClient) CreateFooAsync(ctx context.Context, req *CreateFooInput, options ...*CreateFooOptions) (CreateFooRun, error)
CreateFooAsync executes a(n) CreateFoo workflow in the test environment
func (*TestExampleClient) CreateFooWithSetFooProgress ¶
func (c *TestExampleClient) CreateFooWithSetFooProgress(ctx context.Context, req *CreateFooInput, signal *SetFooProgressRequest, opts ...*CreateFooOptions) (*CreateFooResponse, error)
CreateFooWithSetFooProgress sends a(n) SetFooProgress signal to a(n) CreateFoo workflow, starting it if necessary
func (*TestExampleClient) CreateFooWithSetFooProgressAsync ¶
func (c *TestExampleClient) CreateFooWithSetFooProgressAsync(ctx context.Context, req *CreateFooInput, signal *SetFooProgressRequest, opts ...*CreateFooOptions) (CreateFooRun, error)
CreateFooWithSetFooProgressAsync sends a(n) SetFooProgress signal to a(n) CreateFoo workflow, starting it if necessary
func (*TestExampleClient) GetCreateFoo ¶
func (c *TestExampleClient) GetCreateFoo(ctx context.Context, workflowID string, runID string) CreateFooRun
GetCreateFoo is a noop
func (*TestExampleClient) GetFooProgress ¶
func (c *TestExampleClient) GetFooProgress(ctx context.Context, workflowID string, runID string) (*GetFooProgressResponse, error)
GetFooProgress executes a example.v1.Example.GetFooProgress query
func (*TestExampleClient) GetUpdateFooProgress ¶ added in v1.5.0
func (c *TestExampleClient) GetUpdateFooProgress(ctx context.Context, req client.GetWorkflowUpdateHandleOptions) (UpdateFooProgressHandle, error)
GetUpdateFooProgress retrieves a handle to an existing example.v1.Example.UpdateFooProgress update
func (*TestExampleClient) SetFooProgress ¶
func (c *TestExampleClient) SetFooProgress(ctx context.Context, workflowID string, runID string, req *SetFooProgressRequest) error
SetFooProgress executes a SetFooProgress signal
func (*TestExampleClient) TerminateWorkflow ¶
func (c *TestExampleClient) TerminateWorkflow(ctx context.Context, workflowID string, runID string, reason string, details ...interface{}) error
TerminateWorkflow terminates an existing workflow execution
func (*TestExampleClient) UpdateFooProgress ¶
func (c *TestExampleClient) UpdateFooProgress(ctx context.Context, workflowID string, runID string, req *SetFooProgressRequest, opts ...*UpdateFooProgressOptions) (*GetFooProgressResponse, error)
UpdateFooProgress executes a(n) example.v1.Example.UpdateFooProgress update in the test environment
func (*TestExampleClient) UpdateFooProgressAsync ¶
func (c *TestExampleClient) UpdateFooProgressAsync(ctx context.Context, workflowID string, runID string, req *SetFooProgressRequest, opts ...*UpdateFooProgressOptions) (UpdateFooProgressHandle, error)
UpdateFooProgressAsync executes a(n) example.v1.Example.UpdateFooProgress update in the test environment
type TestExternalClient ¶ added in v1.5.0
type TestExternalClient struct {
// contains filtered or unexported fields
}
TestClient provides a testsuite-compatible Client
func NewTestExternalClient ¶ added in v1.5.0
func NewTestExternalClient(env *testsuite.TestWorkflowEnvironment, workflows ExternalWorkflows, activities ExternalActivities) *TestExternalClient
NewTestExternalClient initializes a new TestExternalClient value
func (*TestExternalClient) CancelWorkflow ¶ added in v1.5.0
func (c *TestExternalClient) CancelWorkflow(ctx context.Context, workflowID string, runID string) error
CancelWorkflow requests cancellation of an existing workflow execution
func (*TestExternalClient) GetProvisionFoo ¶ added in v1.5.0
func (c *TestExternalClient) GetProvisionFoo(ctx context.Context, workflowID string, runID string) ProvisionFooRun
GetProvisionFoo is a noop
func (*TestExternalClient) ProvisionFoo ¶ added in v1.5.0
func (c *TestExternalClient) ProvisionFoo(ctx context.Context, req *ProvisionFooInput, opts ...*ProvisionFooOptions) (*ProvisionFooResponse, error)
ProvisionFoo executes a(n) ProvisionFoo workflow in the test environment
func (*TestExternalClient) ProvisionFooAsync ¶ added in v1.5.0
func (c *TestExternalClient) ProvisionFooAsync(ctx context.Context, req *ProvisionFooInput, options ...*ProvisionFooOptions) (ProvisionFooRun, error)
ProvisionFooAsync executes a(n) ProvisionFoo workflow in the test environment
func (*TestExternalClient) TerminateWorkflow ¶ added in v1.5.0
func (c *TestExternalClient) TerminateWorkflow(ctx context.Context, workflowID string, runID string, reason string, details ...interface{}) error
TerminateWorkflow terminates an existing workflow execution
type UpdateFooProgressHandle ¶
type UpdateFooProgressHandle interface { // WorkflowID returns the workflow ID WorkflowID() string // RunID returns the workflow instance ID RunID() string // UpdateID returns the update ID UpdateID() string // Get blocks until the workflow is complete and returns the result Get(ctx context.Context) (*GetFooProgressResponse, error) }
UpdateFooProgressHandle describes a(n) example.v1.Example.UpdateFooProgress update handle
type UpdateFooProgressOptions ¶
type UpdateFooProgressOptions struct {
// contains filtered or unexported fields
}
UpdateFooProgressOptions provides configuration for a example.v1.Example.UpdateFooProgress update operation
func NewUpdateFooProgressOptions ¶
func NewUpdateFooProgressOptions() *UpdateFooProgressOptions
NewUpdateFooProgressOptions initializes a new UpdateFooProgressOptions value
func (*UpdateFooProgressOptions) WithUpdateWorkflowOptions ¶
func (opts *UpdateFooProgressOptions) WithUpdateWorkflowOptions(options client.UpdateWorkflowWithOptionsRequest) *UpdateFooProgressOptions
WithUpdateWorkflowOptions sets the initial client.UpdateWorkflowWithOptionsRequest
Directories ¶
Path | Synopsis |
---|---|
Code generated by protoc-gen-go_temporal.
|
Code generated by protoc-gen-go_temporal. |