Documentation ¶
Overview ¶
Code generated by protoc-gen-go_temporal. DO NOT EDIT. versions:
protoc-gen-go_temporal 1.10.3-next (0ee894c9c5eb74083457f7963d880cad1a7c1a2f) go go1.22.1 protoc (unknown)
source: example/helloworld/v1/helloworld.proto
Index ¶
- Constants
- Variables
- func NewHelloWorldCli(options ...*HelloWorldCliOptions) (*v2.App, error)
- func NewHelloWorldCliCommand(options ...*HelloWorldCliOptions) (*v2.Command, error)
- func NewHelloWorldClientOptions() *helloWorldClientOptions
- func RegisterHelloWorldActivities(r worker.ActivityRegistry, activities HelloWorldActivities)
- func RegisterHelloWorldActivity(r worker.ActivityRegistry, ...)
- func RegisterHelloWorldWorkflow(r worker.WorkflowRegistry, ...)
- func RegisterHelloWorldWorkflows(r worker.WorkflowRegistry, workflows HelloWorldWorkflows)
- func WithHelloWorldSchemeTypes() scheme.Option
- type HelloWorldActivities
- type HelloWorldActivityOptions
- type HelloWorldChildOptions
- type HelloWorldChildRun
- func (r *HelloWorldChildRun) Get(ctx workflow.Context) (*HelloWorldOutput, error)
- func (r *HelloWorldChildRun) Select(sel workflow.Selector, fn func(*HelloWorldChildRun)) workflow.Selector
- func (r *HelloWorldChildRun) SelectStart(sel workflow.Selector, fn func(*HelloWorldChildRun)) workflow.Selector
- func (r *HelloWorldChildRun) WaitStart(ctx workflow.Context) (*workflow.Execution, error)
- type HelloWorldCliOptions
- func (opts *HelloWorldCliOptions) WithAfter(fn func(*v2.Context) error) *HelloWorldCliOptions
- func (opts *HelloWorldCliOptions) WithBefore(fn func(*v2.Context) error) *HelloWorldCliOptions
- func (opts *HelloWorldCliOptions) WithClient(fn func(*v2.Context) (client.Client, error)) *HelloWorldCliOptions
- func (opts *HelloWorldCliOptions) WithWorker(fn func(*v2.Context, client.Client) (worker.Worker, error)) *HelloWorldCliOptions
- type HelloWorldClient
- type HelloWorldFuture
- type HelloWorldInput
- type HelloWorldLocalActivityOptions
- type HelloWorldOptions
- type HelloWorldOutput
- func HelloWorld(ctx workflow.Context, req *HelloWorldInput, ...) (*HelloWorldOutput, error)
- func HelloWorldChild(ctx workflow.Context, req *HelloWorldInput, options ...*HelloWorldChildOptions) (*HelloWorldOutput, error)
- func HelloWorldLocal(ctx workflow.Context, req *HelloWorldInput, ...) (*HelloWorldOutput, error)
- type HelloWorldRun
- type HelloWorldWorkflow
- type HelloWorldWorkflowInput
- type HelloWorldWorkflows
- type TestHelloWorldClient
- func (c *TestHelloWorldClient) CancelWorkflow(ctx context.Context, workflowID string, runID string) error
- func (c *TestHelloWorldClient) GetHelloWorld(ctx context.Context, workflowID string, runID string) HelloWorldRun
- func (c *TestHelloWorldClient) HelloWorld(ctx context.Context, req *HelloWorldInput, opts ...*HelloWorldOptions) (*HelloWorldOutput, error)
- func (c *TestHelloWorldClient) HelloWorldAsync(ctx context.Context, req *HelloWorldInput, options ...*HelloWorldOptions) (HelloWorldRun, error)
- func (c *TestHelloWorldClient) TerminateWorkflow(ctx context.Context, workflowID string, runID string, reason string, ...) error
Constants ¶
const (
HelloWorldActivityName = "HelloWorld"
)
example.helloworld.v1.HelloWorld activity names
const HelloWorldTaskQueue = "hello-world"
HelloWorldTaskQueue is the default task-queue for a example.helloworld.v1.HelloWorld worker
const (
HelloWorldWorkflowName = "HelloWorld"
)
example.helloworld.v1.HelloWorld workflow names
Variables ¶
var File_example_helloworld_v1_helloworld_proto protoreflect.FileDescriptor
var ( // HelloWorld describes a Temporal workflow and activity with the same name // and signature HelloWorldFunction func(workflow.Context, *HelloWorldInput) (*HelloWorldOutput, error) )
Reference to generated workflow functions
var (
HelloWorldIdexpression = expression.MustParseExpression("hello_world/${! uuid_v4() }")
)
example.helloworld.v1.HelloWorld workflow id expressions
Functions ¶
func NewHelloWorldCli ¶
func NewHelloWorldCli(options ...*HelloWorldCliOptions) (*v2.App, error)
NewHelloWorldCli initializes a cli for a(n) example.helloworld.v1.HelloWorld service
func NewHelloWorldCliCommand ¶
func NewHelloWorldCliCommand(options ...*HelloWorldCliOptions) (*v2.Command, error)
NewHelloWorldCliCommand initializes a cli command for a example.helloworld.v1.HelloWorld service with subcommands for each query, signal, update, and workflow
func NewHelloWorldClientOptions ¶
func NewHelloWorldClientOptions() *helloWorldClientOptions
NewHelloWorldClientOptions initializes a new helloWorldClientOptions value
func RegisterHelloWorldActivities ¶
func RegisterHelloWorldActivities(r worker.ActivityRegistry, activities HelloWorldActivities)
RegisterHelloWorldActivities registers activities with a worker
func RegisterHelloWorldActivity ¶
func RegisterHelloWorldActivity(r worker.ActivityRegistry, fn func(context.Context, *HelloWorldInput) (*HelloWorldOutput, error))
RegisterHelloWorldActivity registers a HelloWorld activity
func RegisterHelloWorldWorkflow ¶
func RegisterHelloWorldWorkflow(r worker.WorkflowRegistry, wf func(workflow.Context, *HelloWorldWorkflowInput) (HelloWorldWorkflow, error))
RegisterHelloWorldWorkflow registers a example.helloworld.v1.HelloWorld.HelloWorld workflow with the given worker
func RegisterHelloWorldWorkflows ¶
func RegisterHelloWorldWorkflows(r worker.WorkflowRegistry, workflows HelloWorldWorkflows)
RegisterHelloWorldWorkflows registers example.helloworld.v1.HelloWorld workflows with the given worker
func WithHelloWorldSchemeTypes ¶
WithHelloWorldSchemeTypes registers all HelloWorld protobuf types with the given scheme
Types ¶
type HelloWorldActivities ¶
type HelloWorldActivities interface { // HelloWorld describes a Temporal workflow and activity with the same name // and signature HelloWorld(ctx context.Context, req *HelloWorldInput) (*HelloWorldOutput, error) }
HelloWorldActivities describes available worker activities
type HelloWorldActivityOptions ¶
type HelloWorldActivityOptions struct {
// contains filtered or unexported fields
}
HelloWorldActivityOptions provides configuration for a(n) HelloWorld activity
func NewHelloWorldActivityOptions ¶
func NewHelloWorldActivityOptions() *HelloWorldActivityOptions
NewHelloWorldActivityOptions sets default ActivityOptions
func (*HelloWorldActivityOptions) WithActivityOptions ¶
func (opts *HelloWorldActivityOptions) WithActivityOptions(options workflow.ActivityOptions) *HelloWorldActivityOptions
WithActivityOptions sets default ActivityOptions
type HelloWorldChildOptions ¶
type HelloWorldChildOptions struct {
// contains filtered or unexported fields
}
HelloWorldChildOptions provides configuration for a HelloWorld workflow operation
func NewHelloWorldChildOptions ¶
func NewHelloWorldChildOptions() *HelloWorldChildOptions
NewHelloWorldChildOptions initializes a new HelloWorldChildOptions value
func (*HelloWorldChildOptions) WithChildWorkflowOptions ¶
func (opts *HelloWorldChildOptions) WithChildWorkflowOptions(options workflow.ChildWorkflowOptions) *HelloWorldChildOptions
WithChildWorkflowOptions sets the initial client.StartWorkflowOptions
type HelloWorldChildRun ¶
type HelloWorldChildRun struct {
Future workflow.ChildWorkflowFuture
}
HelloWorldChildRun describes a child HelloWorld workflow run
func HelloWorldChildAsync ¶
func HelloWorldChildAsync(ctx workflow.Context, req *HelloWorldInput, options ...*HelloWorldChildOptions) (*HelloWorldChildRun, error)
HelloWorld describes a Temporal workflow and activity with the same name and signature
func (*HelloWorldChildRun) Get ¶
func (r *HelloWorldChildRun) Get(ctx workflow.Context) (*HelloWorldOutput, error)
Get blocks until the workflow is completed, returning the response value
func (*HelloWorldChildRun) Select ¶
func (r *HelloWorldChildRun) Select(sel workflow.Selector, fn func(*HelloWorldChildRun)) workflow.Selector
Select adds this completion to the selector. Callback can be nil.
func (*HelloWorldChildRun) SelectStart ¶
func (r *HelloWorldChildRun) SelectStart(sel workflow.Selector, fn func(*HelloWorldChildRun)) workflow.Selector
SelectStart adds waiting for start to the selector. Callback can be nil.
type HelloWorldCliOptions ¶
type HelloWorldCliOptions struct {
// contains filtered or unexported fields
}
HelloWorldCliOptions describes runtime configuration for example.helloworld.v1.HelloWorld cli
func NewHelloWorldCliOptions ¶
func NewHelloWorldCliOptions() *HelloWorldCliOptions
NewHelloWorldCliOptions initializes a new HelloWorldCliOptions value
func (*HelloWorldCliOptions) WithAfter ¶
func (opts *HelloWorldCliOptions) WithAfter(fn func(*v2.Context) error) *HelloWorldCliOptions
WithAfter injects a custom After hook to be run after any command invocation
func (*HelloWorldCliOptions) WithBefore ¶
func (opts *HelloWorldCliOptions) WithBefore(fn func(*v2.Context) error) *HelloWorldCliOptions
WithBefore injects a custom Before hook to be run prior to any command invocation
func (*HelloWorldCliOptions) WithClient ¶
func (opts *HelloWorldCliOptions) WithClient(fn func(*v2.Context) (client.Client, error)) *HelloWorldCliOptions
WithClient provides a Temporal client factory for use by commands
func (*HelloWorldCliOptions) WithWorker ¶
func (opts *HelloWorldCliOptions) WithWorker(fn func(*v2.Context, client.Client) (worker.Worker, error)) *HelloWorldCliOptions
WithWorker provides an method for initializing a worker
type HelloWorldClient ¶
type HelloWorldClient interface { // HelloWorld describes a Temporal workflow and activity with the same name // and signature HelloWorld(ctx context.Context, req *HelloWorldInput, opts ...*HelloWorldOptions) (*HelloWorldOutput, error) // HelloWorldAsync starts a(n) HelloWorld workflow and returns a handle to the workflow run HelloWorldAsync(ctx context.Context, req *HelloWorldInput, opts ...*HelloWorldOptions) (HelloWorldRun, error) // GetHelloWorld retrieves a handle to an existing HelloWorld workflow execution GetHelloWorld(ctx context.Context, workflowID string, runID string) HelloWorldRun // 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 }
HelloWorldClient describes a client for a(n) example.helloworld.v1.HelloWorld worker
func NewHelloWorldClient ¶
func NewHelloWorldClient(c client.Client, options ...*helloWorldClientOptions) HelloWorldClient
NewHelloWorldClient initializes a new example.helloworld.v1.HelloWorld client
func NewHelloWorldClientWithOptions ¶
func NewHelloWorldClientWithOptions(c client.Client, opts client.Options, options ...*helloWorldClientOptions) (HelloWorldClient, error)
NewHelloWorldClientWithOptions initializes a new HelloWorld client with the given options
type HelloWorldFuture ¶
HelloWorldFuture describes a(n) HelloWorld activity execution
func HelloWorldAsync ¶
func HelloWorldAsync(ctx workflow.Context, req *HelloWorldInput, options ...*HelloWorldActivityOptions) *HelloWorldFuture
HelloWorld describes a Temporal workflow and activity with the same name and signature
func HelloWorldLocalAsync ¶
func HelloWorldLocalAsync(ctx workflow.Context, req *HelloWorldInput, options ...*HelloWorldLocalActivityOptions) *HelloWorldFuture
HelloWorld describes a Temporal workflow and activity with the same name and signature
func (*HelloWorldFuture) Get ¶
func (f *HelloWorldFuture) Get(ctx workflow.Context) (*HelloWorldOutput, error)
Get blocks on the activity's completion, returning the response
func (*HelloWorldFuture) Select ¶
func (f *HelloWorldFuture) Select(sel workflow.Selector, fn func(*HelloWorldFuture)) workflow.Selector
Select adds the activity's completion to the selector, callback can be nil
type HelloWorldInput ¶
type HelloWorldInput struct { Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` // contains filtered or unexported fields }
HelloWorldInput describes the input to a HelloWorld task
func UnmarshalCliFlagsToHelloWorldInput ¶
func UnmarshalCliFlagsToHelloWorldInput(cmd *v2.Context) (*HelloWorldInput, error)
UnmarshalCliFlagsToHelloWorldInput unmarshals a HelloWorldInput from command line flags
func (*HelloWorldInput) Descriptor
deprecated
func (*HelloWorldInput) Descriptor() ([]byte, []int)
Deprecated: Use HelloWorldInput.ProtoReflect.Descriptor instead.
func (*HelloWorldInput) GetName ¶
func (x *HelloWorldInput) GetName() string
func (*HelloWorldInput) ProtoMessage ¶
func (*HelloWorldInput) ProtoMessage()
func (*HelloWorldInput) ProtoReflect ¶
func (x *HelloWorldInput) ProtoReflect() protoreflect.Message
func (*HelloWorldInput) Reset ¶
func (x *HelloWorldInput) Reset()
func (*HelloWorldInput) String ¶
func (x *HelloWorldInput) String() string
type HelloWorldLocalActivityOptions ¶
type HelloWorldLocalActivityOptions struct {
// contains filtered or unexported fields
}
HelloWorldLocalActivityOptions provides configuration for a local HelloWorld activity
func NewHelloWorldLocalActivityOptions ¶
func NewHelloWorldLocalActivityOptions() *HelloWorldLocalActivityOptions
NewHelloWorldLocalActivityOptions sets default LocalActivityOptions
func (*HelloWorldLocalActivityOptions) Local ¶
func (opts *HelloWorldLocalActivityOptions) Local(fn func(context.Context, *HelloWorldInput) (*HelloWorldOutput, error)) *HelloWorldLocalActivityOptions
Local provides a local HelloWorld activity implementation
func (*HelloWorldLocalActivityOptions) WithLocalActivityOptions ¶
func (opts *HelloWorldLocalActivityOptions) WithLocalActivityOptions(options workflow.LocalActivityOptions) *HelloWorldLocalActivityOptions
WithLocalActivityOptions sets default LocalActivityOptions
type HelloWorldOptions ¶
type HelloWorldOptions struct {
// contains filtered or unexported fields
}
HelloWorldOptions provides configuration for a HelloWorld workflow operation
func NewHelloWorldOptions ¶
func NewHelloWorldOptions() *HelloWorldOptions
NewHelloWorldOptions initializes a new HelloWorldOptions value
func (*HelloWorldOptions) WithStartWorkflowOptions ¶
func (opts *HelloWorldOptions) WithStartWorkflowOptions(options client.StartWorkflowOptions) *HelloWorldOptions
WithStartWorkflowOptions sets the initial client.StartWorkflowOptions
type HelloWorldOutput ¶
type HelloWorldOutput struct { Result string `protobuf:"bytes,1,opt,name=result,proto3" json:"result,omitempty"` // contains filtered or unexported fields }
HelloWorldOutput describes the output from a HelloWorld task
func HelloWorld ¶
func HelloWorld(ctx workflow.Context, req *HelloWorldInput, options ...*HelloWorldActivityOptions) (*HelloWorldOutput, error)
HelloWorld describes a Temporal workflow and activity with the same name and signature
func HelloWorldChild ¶
func HelloWorldChild(ctx workflow.Context, req *HelloWorldInput, options ...*HelloWorldChildOptions) (*HelloWorldOutput, error)
HelloWorld describes a Temporal workflow and activity with the same name and signature
func HelloWorldLocal ¶
func HelloWorldLocal(ctx workflow.Context, req *HelloWorldInput, options ...*HelloWorldLocalActivityOptions) (*HelloWorldOutput, error)
HelloWorld describes a Temporal workflow and activity with the same name and signature
func (*HelloWorldOutput) Descriptor
deprecated
func (*HelloWorldOutput) Descriptor() ([]byte, []int)
Deprecated: Use HelloWorldOutput.ProtoReflect.Descriptor instead.
func (*HelloWorldOutput) GetResult ¶
func (x *HelloWorldOutput) GetResult() string
func (*HelloWorldOutput) ProtoMessage ¶
func (*HelloWorldOutput) ProtoMessage()
func (*HelloWorldOutput) ProtoReflect ¶
func (x *HelloWorldOutput) ProtoReflect() protoreflect.Message
func (*HelloWorldOutput) Reset ¶
func (x *HelloWorldOutput) Reset()
func (*HelloWorldOutput) String ¶
func (x *HelloWorldOutput) String() string
type HelloWorldRun ¶
type HelloWorldRun 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) (*HelloWorldOutput, 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 }
HelloWorldRun describes a(n) HelloWorld workflow run
type HelloWorldWorkflow ¶
type HelloWorldWorkflow interface { // Execute defines the entrypoint to a(n) HelloWorld workflow Execute(ctx workflow.Context) (*HelloWorldOutput, error) }
HelloWorld describes a Temporal workflow and activity with the same name and signature
workflow details: (id: "hello_world/${! uuid_v4() }")
type HelloWorldWorkflowInput ¶
type HelloWorldWorkflowInput struct {
Req *HelloWorldInput
}
HelloWorldWorkflowInput describes the input to a(n) HelloWorld workflow constructor
type HelloWorldWorkflows ¶
type HelloWorldWorkflows interface { // HelloWorld describes a Temporal workflow and activity with the same name // and signature HelloWorld(ctx workflow.Context, input *HelloWorldWorkflowInput) (HelloWorldWorkflow, error) }
HelloWorldWorkflows provides methods for initializing new example.helloworld.v1.HelloWorld workflow values
type TestHelloWorldClient ¶
type TestHelloWorldClient struct {
// contains filtered or unexported fields
}
TestClient provides a testsuite-compatible Client
func NewTestHelloWorldClient ¶
func NewTestHelloWorldClient(env *testsuite.TestWorkflowEnvironment, workflows HelloWorldWorkflows, activities HelloWorldActivities) *TestHelloWorldClient
NewTestHelloWorldClient initializes a new TestHelloWorldClient value
func (*TestHelloWorldClient) CancelWorkflow ¶
func (c *TestHelloWorldClient) CancelWorkflow(ctx context.Context, workflowID string, runID string) error
CancelWorkflow requests cancellation of an existing workflow execution
func (*TestHelloWorldClient) GetHelloWorld ¶
func (c *TestHelloWorldClient) GetHelloWorld(ctx context.Context, workflowID string, runID string) HelloWorldRun
GetHelloWorld is a noop
func (*TestHelloWorldClient) HelloWorld ¶
func (c *TestHelloWorldClient) HelloWorld(ctx context.Context, req *HelloWorldInput, opts ...*HelloWorldOptions) (*HelloWorldOutput, error)
HelloWorld executes a(n) HelloWorld workflow in the test environment
func (*TestHelloWorldClient) HelloWorldAsync ¶
func (c *TestHelloWorldClient) HelloWorldAsync(ctx context.Context, req *HelloWorldInput, options ...*HelloWorldOptions) (HelloWorldRun, error)
HelloWorldAsync executes a(n) HelloWorld workflow in the test environment
func (*TestHelloWorldClient) TerminateWorkflow ¶
func (c *TestHelloWorldClient) TerminateWorkflow(ctx context.Context, workflowID string, runID string, reason string, details ...interface{}) error
TerminateWorkflow terminates an existing workflow execution
Directories ¶
Path | Synopsis |
---|---|
Code generated by protoc-gen-go_temporal.
|
Code generated by protoc-gen-go_temporal. |