Documentation ¶
Overview ¶
Code generated by protoc-gen-go_temporal. DO NOT EDIT. versions:
protoc-gen-go_temporal 1.14.3-next (974fdc3d78b6359d0e967899ac581d33b6a0bc71) go go1.22.2 protoc (unknown)
source: example/schedule/v1/schedule.proto
Index ¶
- Constants
- Variables
- func NewExampleCli(options ...*ExampleCliOptions) (*v2.App, error)
- func NewExampleCliCommand(options ...*ExampleCliOptions) (*v2.Command, error)
- func NewExampleClientOptions() *exampleClientOptions
- func RegisterExampleActivities(r worker.ActivityRegistry, activities ExampleActivities)
- func RegisterExampleWorkflows(r worker.WorkflowRegistry, workflows ExampleWorkflows)
- func RegisterScheduleWorkflow(r worker.WorkflowRegistry, ...)
- func WithExampleSchemeTypes() scheme.Option
- 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 ExampleWorkflowFunctions
- type ExampleWorkflows
- type ScheduleChildOptions
- func (o *ScheduleChildOptions) Build(ctx workflow.Context, req protoreflect.Message) (workflow.ChildWorkflowOptions, error)
- func (o *ScheduleChildOptions) WithChildWorkflowOptions(options workflow.ChildWorkflowOptions) *ScheduleChildOptions
- func (o *ScheduleChildOptions) WithExecutionTimeout(d time.Duration) *ScheduleChildOptions
- func (o *ScheduleChildOptions) WithID(id string) *ScheduleChildOptions
- func (o *ScheduleChildOptions) WithIDReusePolicy(policy enumsv1.WorkflowIdReusePolicy) *ScheduleChildOptions
- func (o *ScheduleChildOptions) WithParentClosePolicy(policy enumsv1.ParentClosePolicy) *ScheduleChildOptions
- func (o *ScheduleChildOptions) WithRetryPolicy(policy *temporal.RetryPolicy) *ScheduleChildOptions
- func (o *ScheduleChildOptions) WithRunTimeout(d time.Duration) *ScheduleChildOptions
- func (o *ScheduleChildOptions) WithSearchAttributes(sa map[string]any) *ScheduleChildOptions
- func (o *ScheduleChildOptions) WithTaskQueue(tq string) *ScheduleChildOptions
- func (o *ScheduleChildOptions) WithTaskTimeout(d time.Duration) *ScheduleChildOptions
- func (o *ScheduleChildOptions) WithWaitForCancellation(wait bool) *ScheduleChildOptions
- type ScheduleChildRun
- func (r *ScheduleChildRun) Get(ctx workflow.Context) (*ScheduleOutput, error)
- func (r *ScheduleChildRun) Select(sel workflow.Selector, fn func(*ScheduleChildRun)) workflow.Selector
- func (r *ScheduleChildRun) SelectStart(sel workflow.Selector, fn func(*ScheduleChildRun)) workflow.Selector
- func (r *ScheduleChildRun) WaitStart(ctx workflow.Context) (*workflow.Execution, error)
- type ScheduleInput
- type ScheduleOptions
- func (o *ScheduleOptions) Build(req protoreflect.Message) (client.StartWorkflowOptions, error)
- func (o *ScheduleOptions) WithExecutionTimeout(d time.Duration) *ScheduleOptions
- func (o *ScheduleOptions) WithID(id string) *ScheduleOptions
- func (o *ScheduleOptions) WithIDReusePolicy(policy enumsv1.WorkflowIdReusePolicy) *ScheduleOptions
- func (o *ScheduleOptions) WithRetryPolicy(policy *temporal.RetryPolicy) *ScheduleOptions
- func (o *ScheduleOptions) WithRunTimeout(d time.Duration) *ScheduleOptions
- func (o *ScheduleOptions) WithSearchAttributes(sa map[string]any) *ScheduleOptions
- func (o *ScheduleOptions) WithStartWorkflowOptions(options client.StartWorkflowOptions) *ScheduleOptions
- func (o *ScheduleOptions) WithTaskQueue(tq string) *ScheduleOptions
- func (o *ScheduleOptions) WithTaskTimeout(d time.Duration) *ScheduleOptions
- type ScheduleOutput
- type ScheduleRun
- type ScheduleWorkflow
- type ScheduleWorkflowInput
- type TestExampleClient
- func (c *TestExampleClient) CancelWorkflow(ctx context.Context, workflowID string, runID string) error
- func (c *TestExampleClient) GetSchedule(ctx context.Context, workflowID string, runID string) ScheduleRun
- func (c *TestExampleClient) Schedule(ctx context.Context, req *ScheduleInput, opts ...*ScheduleOptions) (*ScheduleOutput, error)
- func (c *TestExampleClient) ScheduleAsync(ctx context.Context, req *ScheduleInput, options ...*ScheduleOptions) (ScheduleRun, error)
- func (c *TestExampleClient) TerminateWorkflow(ctx context.Context, workflowID string, runID string, reason string, ...) error
Constants ¶
const ExampleTaskQueue = "schedule-v1"
ExampleTaskQueue is the default task-queue for a example.schedule.v1.Example worker
const (
ScheduleWorkflowName = "example.schedule.v1.Schedule"
)
example.schedule.v1.Example workflow names
Variables ¶
var File_example_schedule_v1_schedule_proto protoreflect.FileDescriptor
var ( // ScheduleFunction implements a "example.schedule.v1.Schedule" workflow ScheduleFunction func(workflow.Context, *ScheduleInput) (*ScheduleOutput, error) )
Reference to generated workflow functions
Functions ¶
func NewExampleCli ¶
func NewExampleCli(options ...*ExampleCliOptions) (*v2.App, error)
NewExampleCli initializes a cli for a(n) example.schedule.v1.Example service
func NewExampleCliCommand ¶
func NewExampleCliCommand(options ...*ExampleCliOptions) (*v2.Command, error)
NewExampleCliCommand initializes a cli command for a example.schedule.v1.Example service with subcommands for each query, signal, update, and workflow
func NewExampleClientOptions ¶
func NewExampleClientOptions() *exampleClientOptions
NewExampleClientOptions initializes a new exampleClientOptions value
func RegisterExampleActivities ¶
func RegisterExampleActivities(r worker.ActivityRegistry, activities ExampleActivities)
RegisterExampleActivities registers activities with a worker
func RegisterExampleWorkflows ¶
func RegisterExampleWorkflows(r worker.WorkflowRegistry, workflows ExampleWorkflows)
RegisterExampleWorkflows registers example.schedule.v1.Example workflows with the given worker
func RegisterScheduleWorkflow ¶
func RegisterScheduleWorkflow(r worker.WorkflowRegistry, wf func(workflow.Context, *ScheduleWorkflowInput) (ScheduleWorkflow, error))
RegisterScheduleWorkflow registers a example.schedule.v1.Example.Schedule workflow with the given worker
func WithExampleSchemeTypes ¶
WithExampleSchemeTypes registers all Example protobuf types with the given scheme
Types ¶
type ExampleActivities ¶
type ExampleActivities interface{}
ExampleActivities describes available worker activities
type ExampleCliOptions ¶
type ExampleCliOptions struct {
// contains filtered or unexported fields
}
ExampleCliOptions describes runtime configuration for example.schedule.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 { // Schedule executes a(n) example.schedule.v1.Schedule workflow and blocks until error or response received Schedule(ctx context.Context, req *ScheduleInput, opts ...*ScheduleOptions) (*ScheduleOutput, error) // ScheduleAsync starts a(n) example.schedule.v1.Schedule workflow and returns a handle to the workflow run ScheduleAsync(ctx context.Context, req *ScheduleInput, opts ...*ScheduleOptions) (ScheduleRun, error) // GetSchedule retrieves a handle to an existing example.schedule.v1.Schedule workflow execution GetSchedule(ctx context.Context, workflowID string, runID string) ScheduleRun // 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 }
ExampleClient describes a client for a(n) example.schedule.v1.Example worker
func NewExampleClient ¶
func NewExampleClient(c client.Client, options ...*exampleClientOptions) ExampleClient
NewExampleClient initializes a new example.schedule.v1.Example client
func NewExampleClientWithOptions ¶
func NewExampleClientWithOptions(c client.Client, opts client.Options, options ...*exampleClientOptions) (ExampleClient, error)
NewExampleClientWithOptions initializes a new Example client with the given options
type ExampleWorkflowFunctions ¶
type ExampleWorkflowFunctions interface { // Schedule executes a "example.schedule.v1.Schedule" workflow inline Schedule(workflow.Context, *ScheduleInput) (*ScheduleOutput, error) }
ExampleWorkflowFunctions describes a mockable dependency for inlining workflows within other workflows
func NewExampleWorkflowFunctions ¶
func NewExampleWorkflowFunctions() ExampleWorkflowFunctions
type ExampleWorkflows ¶
type ExampleWorkflows interface { // Schedule initializes a new a(n) ScheduleWorkflow implementation Schedule(ctx workflow.Context, input *ScheduleWorkflowInput) (ScheduleWorkflow, error) }
ExampleWorkflows provides methods for initializing new example.schedule.v1.Example workflow values
type ScheduleChildOptions ¶
type ScheduleChildOptions struct {
// contains filtered or unexported fields
}
ScheduleChildOptions provides configuration for a child example.schedule.v1.Schedule workflow operation
func NewScheduleChildOptions ¶
func NewScheduleChildOptions() *ScheduleChildOptions
NewScheduleChildOptions initializes a new ScheduleChildOptions value
func (*ScheduleChildOptions) Build ¶
func (o *ScheduleChildOptions) 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 (*ScheduleChildOptions) WithChildWorkflowOptions ¶
func (o *ScheduleChildOptions) WithChildWorkflowOptions(options workflow.ChildWorkflowOptions) *ScheduleChildOptions
WithChildWorkflowOptions sets the initial go.temporal.io/sdk/workflow.ChildWorkflowOptions
func (*ScheduleChildOptions) WithExecutionTimeout ¶
func (o *ScheduleChildOptions) WithExecutionTimeout(d time.Duration) *ScheduleChildOptions
WithExecutionTimeout sets the WorkflowExecutionTimeout value
func (*ScheduleChildOptions) WithID ¶
func (o *ScheduleChildOptions) WithID(id string) *ScheduleChildOptions
WithID sets the WorkflowID value
func (*ScheduleChildOptions) WithIDReusePolicy ¶
func (o *ScheduleChildOptions) WithIDReusePolicy(policy enumsv1.WorkflowIdReusePolicy) *ScheduleChildOptions
WithIDReusePolicy sets the WorkflowIDReusePolicy value
func (*ScheduleChildOptions) WithParentClosePolicy ¶
func (o *ScheduleChildOptions) WithParentClosePolicy(policy enumsv1.ParentClosePolicy) *ScheduleChildOptions
WithParentClosePolicy sets the WorkflowIDReusePolicy value
func (*ScheduleChildOptions) WithRetryPolicy ¶
func (o *ScheduleChildOptions) WithRetryPolicy(policy *temporal.RetryPolicy) *ScheduleChildOptions
WithRetryPolicy sets the RetryPolicy value
func (*ScheduleChildOptions) WithRunTimeout ¶
func (o *ScheduleChildOptions) WithRunTimeout(d time.Duration) *ScheduleChildOptions
WithRunTimeout sets the WorkflowRunTimeout value
func (*ScheduleChildOptions) WithSearchAttributes ¶
func (o *ScheduleChildOptions) WithSearchAttributes(sa map[string]any) *ScheduleChildOptions
WithSearchAttributes sets the SearchAttributes value
func (*ScheduleChildOptions) WithTaskQueue ¶
func (o *ScheduleChildOptions) WithTaskQueue(tq string) *ScheduleChildOptions
WithTaskQueue sets the TaskQueue value
func (*ScheduleChildOptions) WithTaskTimeout ¶
func (o *ScheduleChildOptions) WithTaskTimeout(d time.Duration) *ScheduleChildOptions
WithTaskTimeout sets the WorkflowTaskTimeout value
func (*ScheduleChildOptions) WithWaitForCancellation ¶
func (o *ScheduleChildOptions) WithWaitForCancellation(wait bool) *ScheduleChildOptions
WithWaitForCancellation sets the WaitForCancellation value
type ScheduleChildRun ¶
type ScheduleChildRun struct {
Future workflow.ChildWorkflowFuture
}
ScheduleChildRun describes a child Schedule workflow run
func ScheduleChildAsync ¶
func ScheduleChildAsync(ctx workflow.Context, req *ScheduleInput, options ...*ScheduleChildOptions) (*ScheduleChildRun, error)
ScheduleChildAsync starts a child example.schedule.v1.Schedule workflow and returns a handle to the child workflow run
func (*ScheduleChildRun) Get ¶
func (r *ScheduleChildRun) Get(ctx workflow.Context) (*ScheduleOutput, error)
Get blocks until the workflow is completed, returning the response value
func (*ScheduleChildRun) Select ¶
func (r *ScheduleChildRun) Select(sel workflow.Selector, fn func(*ScheduleChildRun)) workflow.Selector
Select adds this completion to the selector. Callback can be nil.
func (*ScheduleChildRun) SelectStart ¶
func (r *ScheduleChildRun) SelectStart(sel workflow.Selector, fn func(*ScheduleChildRun)) workflow.Selector
SelectStart adds waiting for start to the selector. Callback can be nil.
type ScheduleInput ¶
type ScheduleInput struct {
// contains filtered or unexported fields
}
func UnmarshalCliFlagsToScheduleInput ¶
func UnmarshalCliFlagsToScheduleInput(cmd *v2.Context) (*ScheduleInput, error)
UnmarshalCliFlagsToScheduleInput unmarshals a ScheduleInput from command line flags
func (*ScheduleInput) Descriptor
deprecated
func (*ScheduleInput) Descriptor() ([]byte, []int)
Deprecated: Use ScheduleInput.ProtoReflect.Descriptor instead.
func (*ScheduleInput) ProtoMessage ¶
func (*ScheduleInput) ProtoMessage()
func (*ScheduleInput) ProtoReflect ¶
func (x *ScheduleInput) ProtoReflect() protoreflect.Message
func (*ScheduleInput) Reset ¶
func (x *ScheduleInput) Reset()
func (*ScheduleInput) String ¶
func (x *ScheduleInput) String() string
type ScheduleOptions ¶
type ScheduleOptions struct {
// contains filtered or unexported fields
}
ScheduleOptions provides configuration for a example.schedule.v1.Schedule workflow operation
func NewScheduleOptions ¶
func NewScheduleOptions() *ScheduleOptions
NewScheduleOptions initializes a new ScheduleOptions value
func (*ScheduleOptions) Build ¶
func (o *ScheduleOptions) Build(req protoreflect.Message) (client.StartWorkflowOptions, error)
Build initializes a new go.temporal.io/sdk/client.StartWorkflowOptions value with defaults and overrides applied
func (*ScheduleOptions) WithExecutionTimeout ¶
func (o *ScheduleOptions) WithExecutionTimeout(d time.Duration) *ScheduleOptions
WithExecutionTimeout sets the WorkflowExecutionTimeout value
func (*ScheduleOptions) WithID ¶
func (o *ScheduleOptions) WithID(id string) *ScheduleOptions
WithID sets the ID value
func (*ScheduleOptions) WithIDReusePolicy ¶
func (o *ScheduleOptions) WithIDReusePolicy(policy enumsv1.WorkflowIdReusePolicy) *ScheduleOptions
WithIDReusePolicy sets the WorkflowIDReusePolicy value
func (*ScheduleOptions) WithRetryPolicy ¶
func (o *ScheduleOptions) WithRetryPolicy(policy *temporal.RetryPolicy) *ScheduleOptions
WithRetryPolicy sets the RetryPolicy value
func (*ScheduleOptions) WithRunTimeout ¶
func (o *ScheduleOptions) WithRunTimeout(d time.Duration) *ScheduleOptions
WithRunTimeout sets the WorkflowRunTimeout value
func (*ScheduleOptions) WithSearchAttributes ¶
func (o *ScheduleOptions) WithSearchAttributes(sa map[string]any) *ScheduleOptions
WithSearchAttributes sets the SearchAttributes value
func (*ScheduleOptions) WithStartWorkflowOptions ¶
func (o *ScheduleOptions) WithStartWorkflowOptions(options client.StartWorkflowOptions) *ScheduleOptions
WithStartWorkflowOptions sets the initial go.temporal.io/sdk/client.StartWorkflowOptions
func (*ScheduleOptions) WithTaskQueue ¶
func (o *ScheduleOptions) WithTaskQueue(tq string) *ScheduleOptions
WithTaskQueue sets the TaskQueue value
func (*ScheduleOptions) WithTaskTimeout ¶
func (o *ScheduleOptions) WithTaskTimeout(d time.Duration) *ScheduleOptions
WithTaskTimeout sets the WorkflowTaskTimeout value
type ScheduleOutput ¶
type ScheduleOutput struct { StartedAt *timestamppb.Timestamp `protobuf:"bytes,1,opt,name=started_at,json=startedAt,proto3" json:"started_at,omitempty"` // contains filtered or unexported fields }
func ScheduleChild ¶
func ScheduleChild(ctx workflow.Context, req *ScheduleInput, options ...*ScheduleChildOptions) (*ScheduleOutput, error)
ScheduleChild executes a child example.schedule.v1.Schedule workflow and blocks until error or response received
func (*ScheduleOutput) Descriptor
deprecated
func (*ScheduleOutput) Descriptor() ([]byte, []int)
Deprecated: Use ScheduleOutput.ProtoReflect.Descriptor instead.
func (*ScheduleOutput) GetStartedAt ¶
func (x *ScheduleOutput) GetStartedAt() *timestamppb.Timestamp
func (*ScheduleOutput) ProtoMessage ¶
func (*ScheduleOutput) ProtoMessage()
func (*ScheduleOutput) ProtoReflect ¶
func (x *ScheduleOutput) ProtoReflect() protoreflect.Message
func (*ScheduleOutput) Reset ¶
func (x *ScheduleOutput) Reset()
func (*ScheduleOutput) String ¶
func (x *ScheduleOutput) String() string
type ScheduleRun ¶
type ScheduleRun 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) (*ScheduleOutput, 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 }
ScheduleRun describes a(n) example.schedule.v1.Schedule workflow run
type ScheduleWorkflow ¶
type ScheduleWorkflow interface { // Execute defines the entrypoint to a(n) example.schedule.v1.Schedule workflow Execute(ctx workflow.Context) (*ScheduleOutput, error) }
ScheduleWorkflow describes a(n) example.schedule.v1.Schedule workflow implementation
type ScheduleWorkflowInput ¶
type ScheduleWorkflowInput struct {
Req *ScheduleInput
}
ScheduleWorkflowInput describes the input to a(n) example.schedule.v1.Schedule workflow constructor
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) GetSchedule ¶
func (c *TestExampleClient) GetSchedule(ctx context.Context, workflowID string, runID string) ScheduleRun
GetSchedule is a noop
func (*TestExampleClient) Schedule ¶
func (c *TestExampleClient) Schedule(ctx context.Context, req *ScheduleInput, opts ...*ScheduleOptions) (*ScheduleOutput, error)
Schedule executes a(n) example.schedule.v1.Schedule workflow in the test environment
func (*TestExampleClient) ScheduleAsync ¶
func (c *TestExampleClient) ScheduleAsync(ctx context.Context, req *ScheduleInput, options ...*ScheduleOptions) (ScheduleRun, error)
ScheduleAsync executes a(n) example.schedule.v1.Schedule workflow in the test environment
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
Directories ¶
Path | Synopsis |
---|---|
Code generated by protoc-gen-go_temporal.
|
Code generated by protoc-gen-go_temporal. |