Documentation ¶
Overview ¶
Code generated by protoc-gen-go_temporal. DO NOT EDIT. versions:
protoc-gen-go_temporal 1.14.5-next (aaaee0598037e11b0806304140622344c324d0ac) go go1.23.4 protoc (unknown)
source: example/updatabletimer/v1/updatabletimer.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 RegisterUpdatableTimerWorkflow(r worker.WorkflowRegistry, ...)
- func UpdatableTimerChild(ctx workflow.Context, req *UpdatableTimerInput, ...) error
- func UpdateWakeUpTimeExternal(ctx workflow.Context, workflowID string, runID string, ...) error
- func UpdateWakeUpTimeExternalAsync(ctx workflow.Context, workflowID string, runID string, ...) workflow.Future
- 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 GetWakeUpTimeOutput
- func (*GetWakeUpTimeOutput) Descriptor() ([]byte, []int)deprecated
- func (x *GetWakeUpTimeOutput) GetWakeUpTime() *timestamppb.Timestamp
- func (*GetWakeUpTimeOutput) ProtoMessage()
- func (x *GetWakeUpTimeOutput) ProtoReflect() protoreflect.Message
- func (x *GetWakeUpTimeOutput) Reset()
- func (x *GetWakeUpTimeOutput) String() string
- type TestExampleClient
- func (c *TestExampleClient) CancelWorkflow(ctx context.Context, workflowID string, runID string) error
- func (c *TestExampleClient) GetUpdatableTimer(ctx context.Context, workflowID string, runID string) UpdatableTimerRun
- func (c *TestExampleClient) GetWakeUpTime(ctx context.Context, workflowID string, runID string) (*GetWakeUpTimeOutput, error)
- func (c *TestExampleClient) TerminateWorkflow(ctx context.Context, workflowID string, runID string, reason string, ...) error
- func (c *TestExampleClient) UpdatableTimer(ctx context.Context, req *UpdatableTimerInput, opts ...*UpdatableTimerOptions) error
- func (c *TestExampleClient) UpdatableTimerAsync(ctx context.Context, req *UpdatableTimerInput, ...) (UpdatableTimerRun, error)
- func (c *TestExampleClient) UpdateWakeUpTime(ctx context.Context, workflowID string, runID string, ...) error
- type UpdatableTimerChildOptions
- func (o *UpdatableTimerChildOptions) Build(ctx workflow.Context, req protoreflect.Message) (workflow.ChildWorkflowOptions, error)
- func (o *UpdatableTimerChildOptions) WithChildWorkflowOptions(options workflow.ChildWorkflowOptions) *UpdatableTimerChildOptions
- func (o *UpdatableTimerChildOptions) WithExecutionTimeout(d time.Duration) *UpdatableTimerChildOptions
- func (o *UpdatableTimerChildOptions) WithID(id string) *UpdatableTimerChildOptions
- func (o *UpdatableTimerChildOptions) WithIDReusePolicy(policy enumsv1.WorkflowIdReusePolicy) *UpdatableTimerChildOptions
- func (o *UpdatableTimerChildOptions) WithParentClosePolicy(policy enumsv1.ParentClosePolicy) *UpdatableTimerChildOptions
- func (o *UpdatableTimerChildOptions) WithRetryPolicy(policy *temporal.RetryPolicy) *UpdatableTimerChildOptions
- func (o *UpdatableTimerChildOptions) WithRunTimeout(d time.Duration) *UpdatableTimerChildOptions
- func (o *UpdatableTimerChildOptions) WithSearchAttributes(sa map[string]any) *UpdatableTimerChildOptions
- func (o *UpdatableTimerChildOptions) WithTaskQueue(tq string) *UpdatableTimerChildOptions
- func (o *UpdatableTimerChildOptions) WithTaskTimeout(d time.Duration) *UpdatableTimerChildOptions
- func (o *UpdatableTimerChildOptions) WithWaitForCancellation(wait bool) *UpdatableTimerChildOptions
- type UpdatableTimerChildRun
- func (r *UpdatableTimerChildRun) Get(ctx workflow.Context) error
- func (r *UpdatableTimerChildRun) Select(sel workflow.Selector, fn func(*UpdatableTimerChildRun)) workflow.Selector
- func (r *UpdatableTimerChildRun) SelectStart(sel workflow.Selector, fn func(*UpdatableTimerChildRun)) workflow.Selector
- func (r *UpdatableTimerChildRun) UpdateWakeUpTime(ctx workflow.Context, input *UpdateWakeUpTimeInput) error
- func (r *UpdatableTimerChildRun) UpdateWakeUpTimeAsync(ctx workflow.Context, input *UpdateWakeUpTimeInput) workflow.Future
- func (r *UpdatableTimerChildRun) WaitStart(ctx workflow.Context) (*workflow.Execution, error)
- type UpdatableTimerInput
- func (*UpdatableTimerInput) Descriptor() ([]byte, []int)deprecated
- func (x *UpdatableTimerInput) GetInitialWakeUpTime() *timestamppb.Timestamp
- func (x *UpdatableTimerInput) GetName() string
- func (*UpdatableTimerInput) ProtoMessage()
- func (x *UpdatableTimerInput) ProtoReflect() protoreflect.Message
- func (x *UpdatableTimerInput) Reset()
- func (x *UpdatableTimerInput) String() string
- type UpdatableTimerOptions
- func (o *UpdatableTimerOptions) Build(req protoreflect.Message) (client.StartWorkflowOptions, error)
- func (o *UpdatableTimerOptions) WithExecutionTimeout(d time.Duration) *UpdatableTimerOptions
- func (o *UpdatableTimerOptions) WithID(id string) *UpdatableTimerOptions
- func (o *UpdatableTimerOptions) WithIDReusePolicy(policy enumsv1.WorkflowIdReusePolicy) *UpdatableTimerOptions
- func (o *UpdatableTimerOptions) WithRetryPolicy(policy *temporal.RetryPolicy) *UpdatableTimerOptions
- func (o *UpdatableTimerOptions) WithRunTimeout(d time.Duration) *UpdatableTimerOptions
- func (o *UpdatableTimerOptions) WithSearchAttributes(sa map[string]any) *UpdatableTimerOptions
- func (o *UpdatableTimerOptions) WithStartWorkflowOptions(options client.StartWorkflowOptions) *UpdatableTimerOptions
- func (o *UpdatableTimerOptions) WithTaskQueue(tq string) *UpdatableTimerOptions
- func (o *UpdatableTimerOptions) WithTaskTimeout(d time.Duration) *UpdatableTimerOptions
- type UpdatableTimerRun
- type UpdatableTimerWorkflow
- type UpdatableTimerWorkflowInput
- type UpdateWakeUpTimeInput
- func (*UpdateWakeUpTimeInput) Descriptor() ([]byte, []int)deprecated
- func (x *UpdateWakeUpTimeInput) GetWakeUpTime() *timestamppb.Timestamp
- func (*UpdateWakeUpTimeInput) ProtoMessage()
- func (x *UpdateWakeUpTimeInput) ProtoReflect() protoreflect.Message
- func (x *UpdateWakeUpTimeInput) Reset()
- func (x *UpdateWakeUpTimeInput) String() string
- type UpdateWakeUpTimeSignal
- func (s *UpdateWakeUpTimeSignal) Receive(ctx workflow.Context) (*UpdateWakeUpTimeInput, bool)
- func (s *UpdateWakeUpTimeSignal) ReceiveAsync() *UpdateWakeUpTimeInput
- func (s *UpdateWakeUpTimeSignal) ReceiveWithTimeout(ctx workflow.Context, timeout time.Duration) (resp *UpdateWakeUpTimeInput, ok bool, more bool)
- func (s *UpdateWakeUpTimeSignal) Select(sel workflow.Selector, fn func(*UpdateWakeUpTimeInput)) workflow.Selector
Constants ¶
const ExampleTaskQueue = "updatable-timer"
ExampleTaskQueue is the default task-queue for a example.updatabletimer.v1.Example worker
const (
GetWakeUpTimeQueryName = "example.updatabletimer.v1.Example.GetWakeUpTime"
)
example.updatabletimer.v1.Example query names
const (
UpdatableTimerWorkflowName = "UpdatableTimer"
)
example.updatabletimer.v1.Example workflow names
const (
UpdateWakeUpTimeSignalName = "example.updatabletimer.v1.Example.UpdateWakeUpTime"
)
example.updatabletimer.v1.Example signal names
Variables ¶
var File_example_updatabletimer_v1_updatabletimer_proto protoreflect.FileDescriptor
var ( // UpdatableTimer describes an updatable timer workflow UpdatableTimerFunction func(workflow.Context, *UpdatableTimerInput) error )
Reference to generated workflow functions
var (
UpdatableTimerIdexpression = expression.MustParseExpression("updatable-timer/${! name.or(uuid_v4()) }")
)
example.updatabletimer.v1.Example workflow id expressions
Functions ¶
func NewExampleCli ¶
func NewExampleCli(options ...*ExampleCliOptions) (*v2.App, error)
NewExampleCli initializes a cli for a(n) example.updatabletimer.v1.Example service
func NewExampleCliCommand ¶
func NewExampleCliCommand(options ...*ExampleCliOptions) (*v2.Command, error)
NewExampleCliCommand initializes a cli command for a example.updatabletimer.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.updatabletimer.v1.Example workflows with the given worker
func RegisterUpdatableTimerWorkflow ¶
func RegisterUpdatableTimerWorkflow(r worker.WorkflowRegistry, wf func(workflow.Context, *UpdatableTimerWorkflowInput) (UpdatableTimerWorkflow, error))
RegisterUpdatableTimerWorkflow registers a example.updatabletimer.v1.Example.UpdatableTimer workflow with the given worker
func UpdatableTimerChild ¶
func UpdatableTimerChild(ctx workflow.Context, req *UpdatableTimerInput, options ...*UpdatableTimerChildOptions) error
UpdatableTimer describes an updatable timer workflow
func UpdateWakeUpTimeExternal ¶
func UpdateWakeUpTimeExternal(ctx workflow.Context, workflowID string, runID string, req *UpdateWakeUpTimeInput) error
UpdateWakeUpTime updates the timer expiration timestamp
func UpdateWakeUpTimeExternalAsync ¶
func UpdateWakeUpTimeExternalAsync(ctx workflow.Context, workflowID string, runID string, req *UpdateWakeUpTimeInput) workflow.Future
UpdateWakeUpTime updates the timer expiration timestamp
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.updatabletimer.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 { // UpdatableTimer describes an updatable timer workflow UpdatableTimer(ctx context.Context, req *UpdatableTimerInput, opts ...*UpdatableTimerOptions) error // UpdatableTimerAsync starts a(n) UpdatableTimer workflow and returns a handle to the workflow run UpdatableTimerAsync(ctx context.Context, req *UpdatableTimerInput, opts ...*UpdatableTimerOptions) (UpdatableTimerRun, error) // GetUpdatableTimer retrieves a handle to an existing UpdatableTimer workflow execution GetUpdatableTimer(ctx context.Context, workflowID string, runID string) UpdatableTimerRun // 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 // GetWakeUpTime retrieves the current timer expiration timestamp GetWakeUpTime(ctx context.Context, workflowID string, runID string) (*GetWakeUpTimeOutput, error) // UpdateWakeUpTime updates the timer expiration timestamp UpdateWakeUpTime(ctx context.Context, workflowID string, runID string, signal *UpdateWakeUpTimeInput) error }
ExampleClient describes a client for a(n) example.updatabletimer.v1.Example worker
func NewExampleClient ¶
func NewExampleClient(c client.Client, options ...*exampleClientOptions) ExampleClient
NewExampleClient initializes a new example.updatabletimer.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 ¶ added in v1.12.0
type ExampleWorkflowFunctions interface { // UpdatableTimer describes an updatable timer workflow UpdatableTimer(workflow.Context, *UpdatableTimerInput) error }
ExampleWorkflowFunctions describes a mockable dependency for inlining workflows within other workflows
func NewExampleWorkflowFunctions ¶ added in v1.12.0
func NewExampleWorkflowFunctions() ExampleWorkflowFunctions
type ExampleWorkflows ¶
type ExampleWorkflows interface { // UpdatableTimer describes an updatable timer workflow UpdatableTimer(ctx workflow.Context, input *UpdatableTimerWorkflowInput) (UpdatableTimerWorkflow, error) }
ExampleWorkflows provides methods for initializing new example.updatabletimer.v1.Example workflow values
type GetWakeUpTimeOutput ¶
type GetWakeUpTimeOutput struct { WakeUpTime *timestamppb.Timestamp `protobuf:"bytes,1,opt,name=wake_up_time,json=wakeUpTime,proto3" json:"wake_up_time,omitempty"` // contains filtered or unexported fields }
GetWakeUpTimeOutput describes the input to a GetWakeUpTime query
func (*GetWakeUpTimeOutput) Descriptor
deprecated
func (*GetWakeUpTimeOutput) Descriptor() ([]byte, []int)
Deprecated: Use GetWakeUpTimeOutput.ProtoReflect.Descriptor instead.
func (*GetWakeUpTimeOutput) GetWakeUpTime ¶
func (x *GetWakeUpTimeOutput) GetWakeUpTime() *timestamppb.Timestamp
func (*GetWakeUpTimeOutput) ProtoMessage ¶
func (*GetWakeUpTimeOutput) ProtoMessage()
func (*GetWakeUpTimeOutput) ProtoReflect ¶
func (x *GetWakeUpTimeOutput) ProtoReflect() protoreflect.Message
func (*GetWakeUpTimeOutput) Reset ¶
func (x *GetWakeUpTimeOutput) Reset()
func (*GetWakeUpTimeOutput) String ¶
func (x *GetWakeUpTimeOutput) String() string
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) GetUpdatableTimer ¶
func (c *TestExampleClient) GetUpdatableTimer(ctx context.Context, workflowID string, runID string) UpdatableTimerRun
GetUpdatableTimer is a noop
func (*TestExampleClient) GetWakeUpTime ¶
func (c *TestExampleClient) GetWakeUpTime(ctx context.Context, workflowID string, runID string) (*GetWakeUpTimeOutput, error)
GetWakeUpTime executes a example.updatabletimer.v1.Example.GetWakeUpTime query
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) UpdatableTimer ¶
func (c *TestExampleClient) UpdatableTimer(ctx context.Context, req *UpdatableTimerInput, opts ...*UpdatableTimerOptions) error
UpdatableTimer executes a(n) UpdatableTimer workflow in the test environment
func (*TestExampleClient) UpdatableTimerAsync ¶
func (c *TestExampleClient) UpdatableTimerAsync(ctx context.Context, req *UpdatableTimerInput, options ...*UpdatableTimerOptions) (UpdatableTimerRun, error)
UpdatableTimerAsync executes a(n) UpdatableTimer workflow in the test environment
func (*TestExampleClient) UpdateWakeUpTime ¶
func (c *TestExampleClient) UpdateWakeUpTime(ctx context.Context, workflowID string, runID string, req *UpdateWakeUpTimeInput) error
UpdateWakeUpTime executes a example.updatabletimer.v1.Example.UpdateWakeUpTime signal
type UpdatableTimerChildOptions ¶
type UpdatableTimerChildOptions struct {
// contains filtered or unexported fields
}
UpdatableTimerChildOptions provides configuration for a child UpdatableTimer workflow operation
func NewUpdatableTimerChildOptions ¶
func NewUpdatableTimerChildOptions() *UpdatableTimerChildOptions
NewUpdatableTimerChildOptions initializes a new UpdatableTimerChildOptions value
func (*UpdatableTimerChildOptions) Build ¶ added in v1.13.0
func (o *UpdatableTimerChildOptions) 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 (*UpdatableTimerChildOptions) WithChildWorkflowOptions ¶
func (o *UpdatableTimerChildOptions) WithChildWorkflowOptions(options workflow.ChildWorkflowOptions) *UpdatableTimerChildOptions
WithChildWorkflowOptions sets the initial go.temporal.io/sdk/workflow.ChildWorkflowOptions
func (*UpdatableTimerChildOptions) WithExecutionTimeout ¶ added in v1.13.0
func (o *UpdatableTimerChildOptions) WithExecutionTimeout(d time.Duration) *UpdatableTimerChildOptions
WithExecutionTimeout sets the WorkflowExecutionTimeout value
func (*UpdatableTimerChildOptions) WithID ¶ added in v1.13.0
func (o *UpdatableTimerChildOptions) WithID(id string) *UpdatableTimerChildOptions
WithID sets the WorkflowID value
func (*UpdatableTimerChildOptions) WithIDReusePolicy ¶ added in v1.13.0
func (o *UpdatableTimerChildOptions) WithIDReusePolicy(policy enumsv1.WorkflowIdReusePolicy) *UpdatableTimerChildOptions
WithIDReusePolicy sets the WorkflowIDReusePolicy value
func (*UpdatableTimerChildOptions) WithParentClosePolicy ¶ added in v1.13.0
func (o *UpdatableTimerChildOptions) WithParentClosePolicy(policy enumsv1.ParentClosePolicy) *UpdatableTimerChildOptions
WithParentClosePolicy sets the WorkflowIDReusePolicy value
func (*UpdatableTimerChildOptions) WithRetryPolicy ¶ added in v1.13.0
func (o *UpdatableTimerChildOptions) WithRetryPolicy(policy *temporal.RetryPolicy) *UpdatableTimerChildOptions
WithRetryPolicy sets the RetryPolicy value
func (*UpdatableTimerChildOptions) WithRunTimeout ¶ added in v1.13.0
func (o *UpdatableTimerChildOptions) WithRunTimeout(d time.Duration) *UpdatableTimerChildOptions
WithRunTimeout sets the WorkflowRunTimeout value
func (*UpdatableTimerChildOptions) WithSearchAttributes ¶ added in v1.13.0
func (o *UpdatableTimerChildOptions) WithSearchAttributes(sa map[string]any) *UpdatableTimerChildOptions
WithSearchAttributes sets the SearchAttributes value
func (*UpdatableTimerChildOptions) WithTaskQueue ¶ added in v1.13.0
func (o *UpdatableTimerChildOptions) WithTaskQueue(tq string) *UpdatableTimerChildOptions
WithTaskQueue sets the TaskQueue value
func (*UpdatableTimerChildOptions) WithTaskTimeout ¶ added in v1.13.0
func (o *UpdatableTimerChildOptions) WithTaskTimeout(d time.Duration) *UpdatableTimerChildOptions
WithTaskTimeout sets the WorkflowTaskTimeout value
func (*UpdatableTimerChildOptions) WithWaitForCancellation ¶ added in v1.13.0
func (o *UpdatableTimerChildOptions) WithWaitForCancellation(wait bool) *UpdatableTimerChildOptions
WithWaitForCancellation sets the WaitForCancellation value
type UpdatableTimerChildRun ¶
type UpdatableTimerChildRun struct {
Future workflow.ChildWorkflowFuture
}
UpdatableTimerChildRun describes a child UpdatableTimer workflow run
func UpdatableTimerChildAsync ¶
func UpdatableTimerChildAsync(ctx workflow.Context, req *UpdatableTimerInput, options ...*UpdatableTimerChildOptions) (*UpdatableTimerChildRun, error)
UpdatableTimer describes an updatable timer workflow
func (*UpdatableTimerChildRun) Get ¶
func (r *UpdatableTimerChildRun) Get(ctx workflow.Context) error
Get blocks until the workflow is completed, returning the response value
func (*UpdatableTimerChildRun) Select ¶
func (r *UpdatableTimerChildRun) Select(sel workflow.Selector, fn func(*UpdatableTimerChildRun)) workflow.Selector
Select adds this completion to the selector. Callback can be nil.
func (*UpdatableTimerChildRun) SelectStart ¶
func (r *UpdatableTimerChildRun) SelectStart(sel workflow.Selector, fn func(*UpdatableTimerChildRun)) workflow.Selector
SelectStart adds waiting for start to the selector. Callback can be nil.
func (*UpdatableTimerChildRun) UpdateWakeUpTime ¶
func (r *UpdatableTimerChildRun) UpdateWakeUpTime(ctx workflow.Context, input *UpdateWakeUpTimeInput) error
UpdateWakeUpTime sends a(n) "example.updatabletimer.v1.Example.UpdateWakeUpTime" signal request to the child workflow
func (*UpdatableTimerChildRun) UpdateWakeUpTimeAsync ¶
func (r *UpdatableTimerChildRun) UpdateWakeUpTimeAsync(ctx workflow.Context, input *UpdateWakeUpTimeInput) workflow.Future
UpdateWakeUpTimeAsync sends a(n) "example.updatabletimer.v1.Example.UpdateWakeUpTime" signal request to the child workflow
type UpdatableTimerInput ¶
type UpdatableTimerInput struct { InitialWakeUpTime *timestamppb.Timestamp `protobuf:"bytes,1,opt,name=initial_wake_up_time,json=initialWakeUpTime,proto3" json:"initial_wake_up_time,omitempty"` Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` // contains filtered or unexported fields }
UpdatableTimerInput describes the input to a UpdatableTimer workflow
func UnmarshalCliFlagsToUpdatableTimerInput ¶
func UnmarshalCliFlagsToUpdatableTimerInput(cmd *v2.Context) (*UpdatableTimerInput, error)
UnmarshalCliFlagsToUpdatableTimerInput unmarshals a UpdatableTimerInput from command line flags
func (*UpdatableTimerInput) Descriptor
deprecated
func (*UpdatableTimerInput) Descriptor() ([]byte, []int)
Deprecated: Use UpdatableTimerInput.ProtoReflect.Descriptor instead.
func (*UpdatableTimerInput) GetInitialWakeUpTime ¶
func (x *UpdatableTimerInput) GetInitialWakeUpTime() *timestamppb.Timestamp
func (*UpdatableTimerInput) GetName ¶
func (x *UpdatableTimerInput) GetName() string
func (*UpdatableTimerInput) ProtoMessage ¶
func (*UpdatableTimerInput) ProtoMessage()
func (*UpdatableTimerInput) ProtoReflect ¶
func (x *UpdatableTimerInput) ProtoReflect() protoreflect.Message
func (*UpdatableTimerInput) Reset ¶
func (x *UpdatableTimerInput) Reset()
func (*UpdatableTimerInput) String ¶
func (x *UpdatableTimerInput) String() string
type UpdatableTimerOptions ¶
type UpdatableTimerOptions struct {
// contains filtered or unexported fields
}
UpdatableTimerOptions provides configuration for a UpdatableTimer workflow operation
func NewUpdatableTimerOptions ¶
func NewUpdatableTimerOptions() *UpdatableTimerOptions
NewUpdatableTimerOptions initializes a new UpdatableTimerOptions value
func (*UpdatableTimerOptions) Build ¶ added in v1.13.0
func (o *UpdatableTimerOptions) Build(req protoreflect.Message) (client.StartWorkflowOptions, error)
Build initializes a new go.temporal.io/sdk/client.StartWorkflowOptions value with defaults and overrides applied
func (*UpdatableTimerOptions) WithExecutionTimeout ¶ added in v1.13.0
func (o *UpdatableTimerOptions) WithExecutionTimeout(d time.Duration) *UpdatableTimerOptions
WithExecutionTimeout sets the WorkflowExecutionTimeout value
func (*UpdatableTimerOptions) WithID ¶ added in v1.13.0
func (o *UpdatableTimerOptions) WithID(id string) *UpdatableTimerOptions
WithID sets the ID value
func (*UpdatableTimerOptions) WithIDReusePolicy ¶ added in v1.13.0
func (o *UpdatableTimerOptions) WithIDReusePolicy(policy enumsv1.WorkflowIdReusePolicy) *UpdatableTimerOptions
WithIDReusePolicy sets the WorkflowIDReusePolicy value
func (*UpdatableTimerOptions) WithRetryPolicy ¶ added in v1.13.0
func (o *UpdatableTimerOptions) WithRetryPolicy(policy *temporal.RetryPolicy) *UpdatableTimerOptions
WithRetryPolicy sets the RetryPolicy value
func (*UpdatableTimerOptions) WithRunTimeout ¶ added in v1.13.0
func (o *UpdatableTimerOptions) WithRunTimeout(d time.Duration) *UpdatableTimerOptions
WithRunTimeout sets the WorkflowRunTimeout value
func (*UpdatableTimerOptions) WithSearchAttributes ¶ added in v1.13.0
func (o *UpdatableTimerOptions) WithSearchAttributes(sa map[string]any) *UpdatableTimerOptions
WithSearchAttributes sets the SearchAttributes value
func (*UpdatableTimerOptions) WithStartWorkflowOptions ¶
func (o *UpdatableTimerOptions) WithStartWorkflowOptions(options client.StartWorkflowOptions) *UpdatableTimerOptions
WithStartWorkflowOptions sets the initial go.temporal.io/sdk/client.StartWorkflowOptions
func (*UpdatableTimerOptions) WithTaskQueue ¶ added in v1.13.0
func (o *UpdatableTimerOptions) WithTaskQueue(tq string) *UpdatableTimerOptions
WithTaskQueue sets the TaskQueue value
func (*UpdatableTimerOptions) WithTaskTimeout ¶ added in v1.13.0
func (o *UpdatableTimerOptions) WithTaskTimeout(d time.Duration) *UpdatableTimerOptions
WithTaskTimeout sets the WorkflowTaskTimeout value
type UpdatableTimerRun ¶
type UpdatableTimerRun 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) 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 // GetWakeUpTime retrieves the current timer expiration timestamp GetWakeUpTime(ctx context.Context) (*GetWakeUpTimeOutput, error) // UpdateWakeUpTime updates the timer expiration timestamp UpdateWakeUpTime(ctx context.Context, req *UpdateWakeUpTimeInput) error }
UpdatableTimerRun describes a(n) UpdatableTimer workflow run
type UpdatableTimerWorkflow ¶
type UpdatableTimerWorkflow interface { // Execute defines the entrypoint to a(n) UpdatableTimer workflow Execute(ctx workflow.Context) error // GetWakeUpTime retrieves the current timer expiration timestamp GetWakeUpTime() (*GetWakeUpTimeOutput, error) }
UpdatableTimer describes an updatable timer workflow
workflow details: (id: "updatable-timer/${! name.or(uuid_v4()) }")
type UpdatableTimerWorkflowInput ¶
type UpdatableTimerWorkflowInput struct { Req *UpdatableTimerInput UpdateWakeUpTime *UpdateWakeUpTimeSignal }
UpdatableTimerWorkflowInput describes the input to a(n) UpdatableTimer workflow constructor
type UpdateWakeUpTimeInput ¶
type UpdateWakeUpTimeInput struct { WakeUpTime *timestamppb.Timestamp `protobuf:"bytes,1,opt,name=wake_up_time,json=wakeUpTime,proto3" json:"wake_up_time,omitempty"` // contains filtered or unexported fields }
UpdateWakeUpTimeInput describes the input to a UpdateWakeUpTime signal
func UnmarshalCliFlagsToUpdateWakeUpTimeInput ¶
func UnmarshalCliFlagsToUpdateWakeUpTimeInput(cmd *v2.Context) (*UpdateWakeUpTimeInput, error)
UnmarshalCliFlagsToUpdateWakeUpTimeInput unmarshals a UpdateWakeUpTimeInput from command line flags
func (*UpdateWakeUpTimeInput) Descriptor
deprecated
func (*UpdateWakeUpTimeInput) Descriptor() ([]byte, []int)
Deprecated: Use UpdateWakeUpTimeInput.ProtoReflect.Descriptor instead.
func (*UpdateWakeUpTimeInput) GetWakeUpTime ¶
func (x *UpdateWakeUpTimeInput) GetWakeUpTime() *timestamppb.Timestamp
func (*UpdateWakeUpTimeInput) ProtoMessage ¶
func (*UpdateWakeUpTimeInput) ProtoMessage()
func (*UpdateWakeUpTimeInput) ProtoReflect ¶
func (x *UpdateWakeUpTimeInput) ProtoReflect() protoreflect.Message
func (*UpdateWakeUpTimeInput) Reset ¶
func (x *UpdateWakeUpTimeInput) Reset()
func (*UpdateWakeUpTimeInput) String ¶
func (x *UpdateWakeUpTimeInput) String() string
type UpdateWakeUpTimeSignal ¶
type UpdateWakeUpTimeSignal struct {
Channel workflow.ReceiveChannel
}
UpdateWakeUpTimeSignal describes a(n) example.updatabletimer.v1.Example.UpdateWakeUpTime signal
func NewUpdateWakeUpTimeSignal ¶
func NewUpdateWakeUpTimeSignal(ctx workflow.Context) *UpdateWakeUpTimeSignal
NewUpdateWakeUpTimeSignal initializes a new example.updatabletimer.v1.Example.UpdateWakeUpTime signal wrapper
func (*UpdateWakeUpTimeSignal) Receive ¶
func (s *UpdateWakeUpTimeSignal) Receive(ctx workflow.Context) (*UpdateWakeUpTimeInput, bool)
Receive blocks until a(n) example.updatabletimer.v1.Example.UpdateWakeUpTime signal is received
func (*UpdateWakeUpTimeSignal) ReceiveAsync ¶
func (s *UpdateWakeUpTimeSignal) ReceiveAsync() *UpdateWakeUpTimeInput
ReceiveAsync checks for a example.updatabletimer.v1.Example.UpdateWakeUpTime signal without blocking
func (*UpdateWakeUpTimeSignal) ReceiveWithTimeout ¶
func (s *UpdateWakeUpTimeSignal) ReceiveWithTimeout(ctx workflow.Context, timeout time.Duration) (resp *UpdateWakeUpTimeInput, ok bool, more bool)
ReceiveWithTimeout blocks until a(n) example.updatabletimer.v1.Example.UpdateWakeUpTime 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 (*UpdateWakeUpTimeSignal) Select ¶
func (s *UpdateWakeUpTimeSignal) Select(sel workflow.Selector, fn func(*UpdateWakeUpTimeInput)) workflow.Selector
Select checks for a(n) example.updatabletimer.v1.Example.UpdateWakeUpTime signal without blocking
Directories ¶
Path | Synopsis |
---|---|
Code generated by protoc-gen-go_temporal.
|
Code generated by protoc-gen-go_temporal. |