Documentation ¶
Overview ¶
Code generated by protoc-gen-go_temporal. DO NOT EDIT. versions:
protoc-gen-go_temporal 1.14.4-next (7c69f56bb01f4f341493709180241a5625d7d83b) go go1.23.3 protoc (unknown)
source: example/mutex/v1/mutex.proto
Index ¶
- Constants
- Variables
- func AcquireLockExternal(ctx workflow.Context, workflowID string, runID string, req *AcquireLockInput) error
- func AcquireLockExternalAsync(ctx workflow.Context, workflowID string, runID string, req *AcquireLockInput) workflow.Future
- func LockAcquiredExternal(ctx workflow.Context, workflowID string, runID string, req *LockAcquiredInput) error
- func LockAcquiredExternalAsync(ctx workflow.Context, workflowID string, runID string, req *LockAcquiredInput) workflow.Future
- func Mutex(ctx workflow.Context, req *MutexInput, options ...*MutexActivityOptions) error
- func MutexChild(ctx workflow.Context, req *MutexInput, options ...*MutexChildOptions) error
- func MutexLocal(ctx workflow.Context, req *MutexInput, options ...*MutexLocalActivityOptions) error
- 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 RegisterMutexActivity(r worker.ActivityRegistry, fn func(context.Context, *MutexInput) error)
- func RegisterMutexWorkflow(r worker.WorkflowRegistry, ...)
- func RegisterSampleWorkflowWithMutexWorkflow(r worker.WorkflowRegistry, ...)
- func ReleaseLockExternal(ctx workflow.Context, workflowID string, runID string, req *ReleaseLockInput) error
- func ReleaseLockExternalAsync(ctx workflow.Context, workflowID string, runID string, req *ReleaseLockInput) workflow.Future
- func SampleWorkflowWithMutexChild(ctx workflow.Context, req *SampleWorkflowWithMutexInput, ...) error
- func WithExampleSchemeTypes() scheme.Option
- type AcquireLockInput
- func (*AcquireLockInput) Descriptor() ([]byte, []int)deprecated
- func (x *AcquireLockInput) GetTimeout() *durationpb.Duration
- func (x *AcquireLockInput) GetWorkflowId() string
- func (*AcquireLockInput) ProtoMessage()
- func (x *AcquireLockInput) ProtoReflect() protoreflect.Message
- func (x *AcquireLockInput) Reset()
- func (x *AcquireLockInput) String() string
- type AcquireLockSignal
- func (s *AcquireLockSignal) Receive(ctx workflow.Context) (*AcquireLockInput, bool)
- func (s *AcquireLockSignal) ReceiveAsync() *AcquireLockInput
- func (s *AcquireLockSignal) ReceiveWithTimeout(ctx workflow.Context, timeout time.Duration) (resp *AcquireLockInput, ok bool, more bool)
- func (s *AcquireLockSignal) Select(sel workflow.Selector, fn func(*AcquireLockInput)) workflow.Selector
- 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 LockAcquiredInput
- type LockAcquiredSignal
- func (s *LockAcquiredSignal) Receive(ctx workflow.Context) (*LockAcquiredInput, bool)
- func (s *LockAcquiredSignal) ReceiveAsync() *LockAcquiredInput
- func (s *LockAcquiredSignal) ReceiveWithTimeout(ctx workflow.Context, timeout time.Duration) (resp *LockAcquiredInput, ok bool, more bool)
- func (s *LockAcquiredSignal) Select(sel workflow.Selector, fn func(*LockAcquiredInput)) workflow.Selector
- type MutexActivityOptions
- func (o *MutexActivityOptions) Build(ctx workflow.Context) (workflow.Context, error)
- func (o *MutexActivityOptions) WithActivityOptions(options workflow.ActivityOptions) *MutexActivityOptions
- func (o *MutexActivityOptions) WithHeartbeatTimeout(d time.Duration) *MutexActivityOptions
- func (o *MutexActivityOptions) WithRetryPolicy(policy *temporal.RetryPolicy) *MutexActivityOptions
- func (o *MutexActivityOptions) WithScheduleToCloseTimeout(d time.Duration) *MutexActivityOptions
- func (o *MutexActivityOptions) WithScheduleToStartTimeout(d time.Duration) *MutexActivityOptions
- func (o *MutexActivityOptions) WithStartToCloseTimeout(d time.Duration) *MutexActivityOptions
- func (o *MutexActivityOptions) WithTaskQueue(tq string) *MutexActivityOptions
- func (o *MutexActivityOptions) WithWaitForCancellation(wait bool) *MutexActivityOptions
- type MutexChildOptions
- func (o *MutexChildOptions) Build(ctx workflow.Context, req protoreflect.Message) (workflow.ChildWorkflowOptions, error)
- func (o *MutexChildOptions) WithChildWorkflowOptions(options workflow.ChildWorkflowOptions) *MutexChildOptions
- func (o *MutexChildOptions) WithExecutionTimeout(d time.Duration) *MutexChildOptions
- func (o *MutexChildOptions) WithID(id string) *MutexChildOptions
- func (o *MutexChildOptions) WithIDReusePolicy(policy enumsv1.WorkflowIdReusePolicy) *MutexChildOptions
- func (o *MutexChildOptions) WithParentClosePolicy(policy enumsv1.ParentClosePolicy) *MutexChildOptions
- func (o *MutexChildOptions) WithRetryPolicy(policy *temporal.RetryPolicy) *MutexChildOptions
- func (o *MutexChildOptions) WithRunTimeout(d time.Duration) *MutexChildOptions
- func (o *MutexChildOptions) WithSearchAttributes(sa map[string]any) *MutexChildOptions
- func (o *MutexChildOptions) WithTaskQueue(tq string) *MutexChildOptions
- func (o *MutexChildOptions) WithTaskTimeout(d time.Duration) *MutexChildOptions
- func (o *MutexChildOptions) WithWaitForCancellation(wait bool) *MutexChildOptions
- type MutexChildRun
- func (r *MutexChildRun) AcquireLock(ctx workflow.Context, input *AcquireLockInput) error
- func (r *MutexChildRun) AcquireLockAsync(ctx workflow.Context, input *AcquireLockInput) workflow.Future
- func (r *MutexChildRun) Get(ctx workflow.Context) error
- func (r *MutexChildRun) ReleaseLock(ctx workflow.Context, input *ReleaseLockInput) error
- func (r *MutexChildRun) ReleaseLockAsync(ctx workflow.Context, input *ReleaseLockInput) workflow.Future
- func (r *MutexChildRun) Select(sel workflow.Selector, fn func(*MutexChildRun)) workflow.Selector
- func (r *MutexChildRun) SelectStart(sel workflow.Selector, fn func(*MutexChildRun)) workflow.Selector
- func (r *MutexChildRun) WaitStart(ctx workflow.Context) (*workflow.Execution, error)
- type MutexFuture
- type MutexInput
- type MutexLocalActivityOptions
- func (o *MutexLocalActivityOptions) Build(ctx workflow.Context) (workflow.Context, error)
- func (o *MutexLocalActivityOptions) Local(fn func(context.Context, *MutexInput) error) *MutexLocalActivityOptions
- func (o *MutexLocalActivityOptions) WithLocalActivityOptions(options workflow.LocalActivityOptions) *MutexLocalActivityOptions
- func (o *MutexLocalActivityOptions) WithRetryPolicy(policy *temporal.RetryPolicy) *MutexLocalActivityOptions
- func (o *MutexLocalActivityOptions) WithScheduleToCloseTimeout(d time.Duration) *MutexLocalActivityOptions
- func (o *MutexLocalActivityOptions) WithStartToCloseTimeout(d time.Duration) *MutexLocalActivityOptions
- type MutexOptions
- func (o *MutexOptions) Build(req protoreflect.Message) (client.StartWorkflowOptions, error)
- func (o *MutexOptions) WithExecutionTimeout(d time.Duration) *MutexOptions
- func (o *MutexOptions) WithID(id string) *MutexOptions
- func (o *MutexOptions) WithIDReusePolicy(policy enumsv1.WorkflowIdReusePolicy) *MutexOptions
- func (o *MutexOptions) WithRetryPolicy(policy *temporal.RetryPolicy) *MutexOptions
- func (o *MutexOptions) WithRunTimeout(d time.Duration) *MutexOptions
- func (o *MutexOptions) WithSearchAttributes(sa map[string]any) *MutexOptions
- func (o *MutexOptions) WithStartWorkflowOptions(options client.StartWorkflowOptions) *MutexOptions
- func (o *MutexOptions) WithTaskQueue(tq string) *MutexOptions
- func (o *MutexOptions) WithTaskTimeout(d time.Duration) *MutexOptions
- type MutexRun
- type MutexWorkflow
- type MutexWorkflowInput
- type ReleaseLockInput
- type ReleaseLockSignal
- func (s *ReleaseLockSignal) Receive(ctx workflow.Context) (*ReleaseLockInput, bool)
- func (s *ReleaseLockSignal) ReceiveAsync() *ReleaseLockInput
- func (s *ReleaseLockSignal) ReceiveWithTimeout(ctx workflow.Context, timeout time.Duration) (resp *ReleaseLockInput, ok bool, more bool)
- func (s *ReleaseLockSignal) Select(sel workflow.Selector, fn func(*ReleaseLockInput)) workflow.Selector
- type SampleWorkflowWithMutexChildOptions
- func (o *SampleWorkflowWithMutexChildOptions) Build(ctx workflow.Context, req protoreflect.Message) (workflow.ChildWorkflowOptions, error)
- func (o *SampleWorkflowWithMutexChildOptions) WithChildWorkflowOptions(options workflow.ChildWorkflowOptions) *SampleWorkflowWithMutexChildOptions
- func (o *SampleWorkflowWithMutexChildOptions) WithExecutionTimeout(d time.Duration) *SampleWorkflowWithMutexChildOptions
- func (o *SampleWorkflowWithMutexChildOptions) WithID(id string) *SampleWorkflowWithMutexChildOptions
- func (o *SampleWorkflowWithMutexChildOptions) WithIDReusePolicy(policy enumsv1.WorkflowIdReusePolicy) *SampleWorkflowWithMutexChildOptions
- func (o *SampleWorkflowWithMutexChildOptions) WithParentClosePolicy(policy enumsv1.ParentClosePolicy) *SampleWorkflowWithMutexChildOptions
- func (o *SampleWorkflowWithMutexChildOptions) WithRetryPolicy(policy *temporal.RetryPolicy) *SampleWorkflowWithMutexChildOptions
- func (o *SampleWorkflowWithMutexChildOptions) WithRunTimeout(d time.Duration) *SampleWorkflowWithMutexChildOptions
- func (o *SampleWorkflowWithMutexChildOptions) WithSearchAttributes(sa map[string]any) *SampleWorkflowWithMutexChildOptions
- func (o *SampleWorkflowWithMutexChildOptions) WithTaskQueue(tq string) *SampleWorkflowWithMutexChildOptions
- func (o *SampleWorkflowWithMutexChildOptions) WithTaskTimeout(d time.Duration) *SampleWorkflowWithMutexChildOptions
- func (o *SampleWorkflowWithMutexChildOptions) WithWaitForCancellation(wait bool) *SampleWorkflowWithMutexChildOptions
- type SampleWorkflowWithMutexChildRun
- func (r *SampleWorkflowWithMutexChildRun) Get(ctx workflow.Context) error
- func (r *SampleWorkflowWithMutexChildRun) LockAcquired(ctx workflow.Context, input *LockAcquiredInput) error
- func (r *SampleWorkflowWithMutexChildRun) LockAcquiredAsync(ctx workflow.Context, input *LockAcquiredInput) workflow.Future
- func (r *SampleWorkflowWithMutexChildRun) Select(sel workflow.Selector, fn func(*SampleWorkflowWithMutexChildRun)) workflow.Selector
- func (r *SampleWorkflowWithMutexChildRun) SelectStart(sel workflow.Selector, fn func(*SampleWorkflowWithMutexChildRun)) workflow.Selector
- func (r *SampleWorkflowWithMutexChildRun) WaitStart(ctx workflow.Context) (*workflow.Execution, error)
- type SampleWorkflowWithMutexInput
- func (*SampleWorkflowWithMutexInput) Descriptor() ([]byte, []int)deprecated
- func (x *SampleWorkflowWithMutexInput) GetResourceId() string
- func (x *SampleWorkflowWithMutexInput) GetSleep() *durationpb.Duration
- func (*SampleWorkflowWithMutexInput) ProtoMessage()
- func (x *SampleWorkflowWithMutexInput) ProtoReflect() protoreflect.Message
- func (x *SampleWorkflowWithMutexInput) Reset()
- func (x *SampleWorkflowWithMutexInput) String() string
- type SampleWorkflowWithMutexOptions
- func (o *SampleWorkflowWithMutexOptions) Build(req protoreflect.Message) (client.StartWorkflowOptions, error)
- func (o *SampleWorkflowWithMutexOptions) WithExecutionTimeout(d time.Duration) *SampleWorkflowWithMutexOptions
- func (o *SampleWorkflowWithMutexOptions) WithID(id string) *SampleWorkflowWithMutexOptions
- func (o *SampleWorkflowWithMutexOptions) WithIDReusePolicy(policy enumsv1.WorkflowIdReusePolicy) *SampleWorkflowWithMutexOptions
- func (o *SampleWorkflowWithMutexOptions) WithRetryPolicy(policy *temporal.RetryPolicy) *SampleWorkflowWithMutexOptions
- func (o *SampleWorkflowWithMutexOptions) WithRunTimeout(d time.Duration) *SampleWorkflowWithMutexOptions
- func (o *SampleWorkflowWithMutexOptions) WithSearchAttributes(sa map[string]any) *SampleWorkflowWithMutexOptions
- func (o *SampleWorkflowWithMutexOptions) WithStartWorkflowOptions(options client.StartWorkflowOptions) *SampleWorkflowWithMutexOptions
- func (o *SampleWorkflowWithMutexOptions) WithTaskQueue(tq string) *SampleWorkflowWithMutexOptions
- func (o *SampleWorkflowWithMutexOptions) WithTaskTimeout(d time.Duration) *SampleWorkflowWithMutexOptions
- type SampleWorkflowWithMutexRun
- type SampleWorkflowWithMutexWorkflow
- type SampleWorkflowWithMutexWorkflowInput
- type TestExampleClient
- func (c *TestExampleClient) AcquireLock(ctx context.Context, workflowID string, runID string, req *AcquireLockInput) error
- func (c *TestExampleClient) CancelWorkflow(ctx context.Context, workflowID string, runID string) error
- func (c *TestExampleClient) GetMutex(ctx context.Context, workflowID string, runID string) MutexRun
- func (c *TestExampleClient) GetSampleWorkflowWithMutex(ctx context.Context, workflowID string, runID string) SampleWorkflowWithMutexRun
- func (c *TestExampleClient) LockAcquired(ctx context.Context, workflowID string, runID string, req *LockAcquiredInput) error
- func (c *TestExampleClient) Mutex(ctx context.Context, req *MutexInput, opts ...*MutexOptions) error
- func (c *TestExampleClient) MutexAsync(ctx context.Context, req *MutexInput, options ...*MutexOptions) (MutexRun, error)
- func (c *TestExampleClient) MutexWithAcquireLock(ctx context.Context, req *MutexInput, signal *AcquireLockInput, ...) error
- func (c *TestExampleClient) MutexWithAcquireLockAsync(ctx context.Context, req *MutexInput, signal *AcquireLockInput, ...) (MutexRun, error)
- func (c *TestExampleClient) ReleaseLock(ctx context.Context, workflowID string, runID string, req *ReleaseLockInput) error
- func (c *TestExampleClient) SampleWorkflowWithMutex(ctx context.Context, req *SampleWorkflowWithMutexInput, ...) error
- func (c *TestExampleClient) SampleWorkflowWithMutexAsync(ctx context.Context, req *SampleWorkflowWithMutexInput, ...) (SampleWorkflowWithMutexRun, error)
- func (c *TestExampleClient) TerminateWorkflow(ctx context.Context, workflowID string, runID string, reason string, ...) error
Constants ¶
const ( MutexWorkflowName = "example.mutex.v1.Example.Mutex" SampleWorkflowWithMutexWorkflowName = "example.mutex.v1.Example.SampleWorkflowWithMutex" )
example.mutex.v1.Example workflow names
const ( AcquireLockSignalName = "example.mutex.v1.Example.AcquireLock" LockAcquiredSignalName = "example.mutex.v1.Example.LockAcquired" ReleaseLockSignalName = "example.mutex.v1.Example.ReleaseLock" )
example.mutex.v1.Example signal names
const ExampleTaskQueue = "mutex"
ExampleTaskQueue is the default task-queue for a example.mutex.v1.Example worker
const (
MutexActivityName = "example.mutex.v1.Example.Mutex"
)
example.mutex.v1.Example activity names
Variables ¶
var ( MutexIdexpression = expression.MustParseExpression("mutex:${! resourceId }") SampleWorkflowWithMutexIdexpression = expression.MustParseExpression("SampleWorkflow1WithMutex_${! uuid_v4() }") )
example.mutex.v1.Example workflow id expressions
var ( // MutexFunction implements a "example.mutex.v1.Example.Mutex" workflow MutexFunction func(workflow.Context, *MutexInput) error // SampleWorkflowWithMutexFunction implements a "example.mutex.v1.Example.SampleWorkflowWithMutex" workflow SampleWorkflowWithMutexFunction func(workflow.Context, *SampleWorkflowWithMutexInput) error )
Reference to generated workflow functions
var File_example_mutex_v1_mutex_proto protoreflect.FileDescriptor
Functions ¶
func AcquireLockExternal ¶
func AcquireLockExternal(ctx workflow.Context, workflowID string, runID string, req *AcquireLockInput) error
AcquireLockExternal sends a(n) example.mutex.v1.Example.AcquireLock signal to an existing workflow
func AcquireLockExternalAsync ¶
func AcquireLockExternalAsync(ctx workflow.Context, workflowID string, runID string, req *AcquireLockInput) workflow.Future
AcquireLockExternalAsync sends a(n) example.mutex.v1.Example.AcquireLock signal to an existing workflow
func LockAcquiredExternal ¶
func LockAcquiredExternal(ctx workflow.Context, workflowID string, runID string, req *LockAcquiredInput) error
LockAcquiredExternal sends a(n) example.mutex.v1.Example.LockAcquired signal to an existing workflow
func LockAcquiredExternalAsync ¶
func LockAcquiredExternalAsync(ctx workflow.Context, workflowID string, runID string, req *LockAcquiredInput) workflow.Future
LockAcquiredExternalAsync sends a(n) example.mutex.v1.Example.LockAcquired signal to an existing workflow
func Mutex ¶
func Mutex(ctx workflow.Context, req *MutexInput, options ...*MutexActivityOptions) error
Mutex executes a(n) example.mutex.v1.Example.Mutex activity
func MutexChild ¶
func MutexChild(ctx workflow.Context, req *MutexInput, options ...*MutexChildOptions) error
MutexChild executes a child example.mutex.v1.Example.Mutex workflow and blocks until error or response received
func MutexLocal ¶
func MutexLocal(ctx workflow.Context, req *MutexInput, options ...*MutexLocalActivityOptions) error
MutexLocal executes a(n) example.mutex.v1.Example.Mutex activity (locally)
func NewExampleCli ¶
func NewExampleCli(options ...*ExampleCliOptions) (*v2.App, error)
NewExampleCli initializes a cli for a(n) example.mutex.v1.Example service
func NewExampleCliCommand ¶
func NewExampleCliCommand(options ...*ExampleCliOptions) (*v2.Command, error)
NewExampleCliCommand initializes a cli command for a example.mutex.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.mutex.v1.Example workflows with the given worker
func RegisterMutexActivity ¶
func RegisterMutexActivity(r worker.ActivityRegistry, fn func(context.Context, *MutexInput) error)
RegisterMutexActivity registers a example.mutex.v1.Example.Mutex activity
func RegisterMutexWorkflow ¶
func RegisterMutexWorkflow(r worker.WorkflowRegistry, wf func(workflow.Context, *MutexWorkflowInput) (MutexWorkflow, error))
RegisterMutexWorkflow registers a example.mutex.v1.Example.Mutex workflow with the given worker
func RegisterSampleWorkflowWithMutexWorkflow ¶
func RegisterSampleWorkflowWithMutexWorkflow(r worker.WorkflowRegistry, wf func(workflow.Context, *SampleWorkflowWithMutexWorkflowInput) (SampleWorkflowWithMutexWorkflow, error))
RegisterSampleWorkflowWithMutexWorkflow registers a example.mutex.v1.Example.SampleWorkflowWithMutex workflow with the given worker
func ReleaseLockExternal ¶
func ReleaseLockExternal(ctx workflow.Context, workflowID string, runID string, req *ReleaseLockInput) error
ReleaseLockExternal sends a(n) example.mutex.v1.Example.ReleaseLock signal to an existing workflow
func ReleaseLockExternalAsync ¶
func ReleaseLockExternalAsync(ctx workflow.Context, workflowID string, runID string, req *ReleaseLockInput) workflow.Future
ReleaseLockExternalAsync sends a(n) example.mutex.v1.Example.ReleaseLock signal to an existing workflow
func SampleWorkflowWithMutexChild ¶
func SampleWorkflowWithMutexChild(ctx workflow.Context, req *SampleWorkflowWithMutexInput, options ...*SampleWorkflowWithMutexChildOptions) error
SampleWorkflowWithMutexChild executes a child example.mutex.v1.Example.SampleWorkflowWithMutex workflow and blocks until error or response received
func WithExampleSchemeTypes ¶
WithExampleSchemeTypes registers all Example protobuf types with the given scheme
Types ¶
type AcquireLockInput ¶
type AcquireLockInput struct { WorkflowId string `protobuf:"bytes,1,opt,name=workflow_id,json=workflowId,proto3" json:"workflow_id,omitempty"` Timeout *durationpb.Duration `protobuf:"bytes,2,opt,name=timeout,proto3" json:"timeout,omitempty"` // contains filtered or unexported fields }
func UnmarshalCliFlagsToAcquireLockInput ¶
func UnmarshalCliFlagsToAcquireLockInput(cmd *v2.Context) (*AcquireLockInput, error)
UnmarshalCliFlagsToAcquireLockInput unmarshals a AcquireLockInput from command line flags
func (*AcquireLockInput) Descriptor
deprecated
func (*AcquireLockInput) Descriptor() ([]byte, []int)
Deprecated: Use AcquireLockInput.ProtoReflect.Descriptor instead.
func (*AcquireLockInput) GetTimeout ¶
func (x *AcquireLockInput) GetTimeout() *durationpb.Duration
func (*AcquireLockInput) GetWorkflowId ¶
func (x *AcquireLockInput) GetWorkflowId() string
func (*AcquireLockInput) ProtoMessage ¶
func (*AcquireLockInput) ProtoMessage()
func (*AcquireLockInput) ProtoReflect ¶
func (x *AcquireLockInput) ProtoReflect() protoreflect.Message
func (*AcquireLockInput) Reset ¶
func (x *AcquireLockInput) Reset()
func (*AcquireLockInput) String ¶
func (x *AcquireLockInput) String() string
type AcquireLockSignal ¶
type AcquireLockSignal struct {
Channel workflow.ReceiveChannel
}
AcquireLockSignal describes a(n) example.mutex.v1.Example.AcquireLock signal
func NewAcquireLockSignal ¶
func NewAcquireLockSignal(ctx workflow.Context) *AcquireLockSignal
NewAcquireLockSignal initializes a new example.mutex.v1.Example.AcquireLock signal wrapper
func (*AcquireLockSignal) Receive ¶
func (s *AcquireLockSignal) Receive(ctx workflow.Context) (*AcquireLockInput, bool)
Receive blocks until a(n) example.mutex.v1.Example.AcquireLock signal is received
func (*AcquireLockSignal) ReceiveAsync ¶
func (s *AcquireLockSignal) ReceiveAsync() *AcquireLockInput
ReceiveAsync checks for a example.mutex.v1.Example.AcquireLock signal without blocking
func (*AcquireLockSignal) ReceiveWithTimeout ¶
func (s *AcquireLockSignal) ReceiveWithTimeout(ctx workflow.Context, timeout time.Duration) (resp *AcquireLockInput, ok bool, more bool)
ReceiveWithTimeout blocks until a(n) example.mutex.v1.Example.AcquireLock 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 (*AcquireLockSignal) Select ¶
func (s *AcquireLockSignal) Select(sel workflow.Selector, fn func(*AcquireLockInput)) workflow.Selector
Select checks for a(n) example.mutex.v1.Example.AcquireLock signal without blocking
type ExampleActivities ¶
type ExampleActivities interface { // example.mutex.v1.Example.Mutex implements a(n) example.mutex.v1.Example.Mutex activity definition Mutex(ctx context.Context, req *MutexInput) error }
ExampleActivities describes available worker activities
type ExampleCliOptions ¶
type ExampleCliOptions struct {
// contains filtered or unexported fields
}
ExampleCliOptions describes runtime configuration for example.mutex.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 { // Mutex executes a(n) example.mutex.v1.Example.Mutex workflow and blocks until error or response received Mutex(ctx context.Context, req *MutexInput, opts ...*MutexOptions) error // MutexAsync starts a(n) example.mutex.v1.Example.Mutex workflow and returns a handle to the workflow run MutexAsync(ctx context.Context, req *MutexInput, opts ...*MutexOptions) (MutexRun, error) // GetMutex retrieves a handle to an existing example.mutex.v1.Example.Mutex workflow execution GetMutex(ctx context.Context, workflowID string, runID string) MutexRun // MutexWithAcquireLock sends a(n) example.mutex.v1.Example.AcquireLock signal to a(n) example.mutex.v1.Example.Mutex workflow, starting it if necessary, and blocks until workflow completion MutexWithAcquireLock(ctx context.Context, req *MutexInput, signal *AcquireLockInput, opts ...*MutexOptions) error // MutexWithAcquireLockAsync sends a(n) example.mutex.v1.Example.AcquireLock signal to a(n) example.mutex.v1.Example.Mutex workflow, starting it if necessary, and returns a handle to the workflow execution MutexWithAcquireLockAsync(ctx context.Context, req *MutexInput, signal *AcquireLockInput, opts ...*MutexOptions) (MutexRun, error) // SampleWorkflowWithMutex executes a(n) example.mutex.v1.Example.SampleWorkflowWithMutex workflow and blocks until error or response received SampleWorkflowWithMutex(ctx context.Context, req *SampleWorkflowWithMutexInput, opts ...*SampleWorkflowWithMutexOptions) error // SampleWorkflowWithMutexAsync starts a(n) example.mutex.v1.Example.SampleWorkflowWithMutex workflow and returns a handle to the workflow run SampleWorkflowWithMutexAsync(ctx context.Context, req *SampleWorkflowWithMutexInput, opts ...*SampleWorkflowWithMutexOptions) (SampleWorkflowWithMutexRun, error) // GetSampleWorkflowWithMutex retrieves a handle to an existing example.mutex.v1.Example.SampleWorkflowWithMutex workflow execution GetSampleWorkflowWithMutex(ctx context.Context, workflowID string, runID string) SampleWorkflowWithMutexRun // 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 // example.mutex.v1.Example.AcquireLock sends a(n) example.mutex.v1.Example.AcquireLock signal AcquireLock(ctx context.Context, workflowID string, runID string, signal *AcquireLockInput) error // example.mutex.v1.Example.LockAcquired sends a(n) example.mutex.v1.Example.LockAcquired signal LockAcquired(ctx context.Context, workflowID string, runID string, signal *LockAcquiredInput) error // example.mutex.v1.Example.ReleaseLock sends a(n) example.mutex.v1.Example.ReleaseLock signal ReleaseLock(ctx context.Context, workflowID string, runID string, signal *ReleaseLockInput) error }
ExampleClient describes a client for a(n) example.mutex.v1.Example worker
func NewExampleClient ¶
func NewExampleClient(c client.Client, options ...*exampleClientOptions) ExampleClient
NewExampleClient initializes a new example.mutex.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 { // Mutex executes a "example.mutex.v1.Example.Mutex" workflow inline Mutex(workflow.Context, *MutexInput) error // SampleWorkflowWithMutex executes a "example.mutex.v1.Example.SampleWorkflowWithMutex" workflow inline SampleWorkflowWithMutex(workflow.Context, *SampleWorkflowWithMutexInput) 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 { // Mutex initializes a new a(n) MutexWorkflow implementation Mutex(ctx workflow.Context, input *MutexWorkflowInput) (MutexWorkflow, error) // SampleWorkflowWithMutex initializes a new a(n) SampleWorkflowWithMutexWorkflow implementation SampleWorkflowWithMutex(ctx workflow.Context, input *SampleWorkflowWithMutexWorkflowInput) (SampleWorkflowWithMutexWorkflow, error) }
ExampleWorkflows provides methods for initializing new example.mutex.v1.Example workflow values
type LockAcquiredInput ¶
type LockAcquiredInput struct { LeaseId string `protobuf:"bytes,1,opt,name=lease_id,json=leaseId,proto3" json:"lease_id,omitempty"` // contains filtered or unexported fields }
func UnmarshalCliFlagsToLockAcquiredInput ¶
func UnmarshalCliFlagsToLockAcquiredInput(cmd *v2.Context) (*LockAcquiredInput, error)
UnmarshalCliFlagsToLockAcquiredInput unmarshals a LockAcquiredInput from command line flags
func (*LockAcquiredInput) Descriptor
deprecated
func (*LockAcquiredInput) Descriptor() ([]byte, []int)
Deprecated: Use LockAcquiredInput.ProtoReflect.Descriptor instead.
func (*LockAcquiredInput) GetLeaseId ¶
func (x *LockAcquiredInput) GetLeaseId() string
func (*LockAcquiredInput) ProtoMessage ¶
func (*LockAcquiredInput) ProtoMessage()
func (*LockAcquiredInput) ProtoReflect ¶
func (x *LockAcquiredInput) ProtoReflect() protoreflect.Message
func (*LockAcquiredInput) Reset ¶
func (x *LockAcquiredInput) Reset()
func (*LockAcquiredInput) String ¶
func (x *LockAcquiredInput) String() string
type LockAcquiredSignal ¶
type LockAcquiredSignal struct {
Channel workflow.ReceiveChannel
}
LockAcquiredSignal describes a(n) example.mutex.v1.Example.LockAcquired signal
func NewLockAcquiredSignal ¶
func NewLockAcquiredSignal(ctx workflow.Context) *LockAcquiredSignal
NewLockAcquiredSignal initializes a new example.mutex.v1.Example.LockAcquired signal wrapper
func (*LockAcquiredSignal) Receive ¶
func (s *LockAcquiredSignal) Receive(ctx workflow.Context) (*LockAcquiredInput, bool)
Receive blocks until a(n) example.mutex.v1.Example.LockAcquired signal is received
func (*LockAcquiredSignal) ReceiveAsync ¶
func (s *LockAcquiredSignal) ReceiveAsync() *LockAcquiredInput
ReceiveAsync checks for a example.mutex.v1.Example.LockAcquired signal without blocking
func (*LockAcquiredSignal) ReceiveWithTimeout ¶
func (s *LockAcquiredSignal) ReceiveWithTimeout(ctx workflow.Context, timeout time.Duration) (resp *LockAcquiredInput, ok bool, more bool)
ReceiveWithTimeout blocks until a(n) example.mutex.v1.Example.LockAcquired 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 (*LockAcquiredSignal) Select ¶
func (s *LockAcquiredSignal) Select(sel workflow.Selector, fn func(*LockAcquiredInput)) workflow.Selector
Select checks for a(n) example.mutex.v1.Example.LockAcquired signal without blocking
type MutexActivityOptions ¶
type MutexActivityOptions struct {
// contains filtered or unexported fields
}
MutexActivityOptions provides configuration for a(n) example.mutex.v1.Example.Mutex activity
func NewMutexActivityOptions ¶
func NewMutexActivityOptions() *MutexActivityOptions
NewMutexActivityOptions initializes a new MutexActivityOptions value
func (*MutexActivityOptions) Build ¶ added in v1.13.0
Build initializes a workflow.Context with appropriate ActivityOptions values derived from schema defaults and any user-defined overrides
func (*MutexActivityOptions) WithActivityOptions ¶
func (o *MutexActivityOptions) WithActivityOptions(options workflow.ActivityOptions) *MutexActivityOptions
WithActivityOptions specifies an initial ActivityOptions value to which defaults will be applied
func (*MutexActivityOptions) WithHeartbeatTimeout ¶ added in v1.13.0
func (o *MutexActivityOptions) WithHeartbeatTimeout(d time.Duration) *MutexActivityOptions
WithHeartbeatTimeout sets the HeartbeatTimeout value
func (*MutexActivityOptions) WithRetryPolicy ¶ added in v1.13.0
func (o *MutexActivityOptions) WithRetryPolicy(policy *temporal.RetryPolicy) *MutexActivityOptions
WithRetryPolicy sets the RetryPolicy value
func (*MutexActivityOptions) WithScheduleToCloseTimeout ¶ added in v1.13.0
func (o *MutexActivityOptions) WithScheduleToCloseTimeout(d time.Duration) *MutexActivityOptions
WithScheduleToCloseTimeout sets the ScheduleToCloseTimeout value
func (*MutexActivityOptions) WithScheduleToStartTimeout ¶ added in v1.13.0
func (o *MutexActivityOptions) WithScheduleToStartTimeout(d time.Duration) *MutexActivityOptions
WithScheduleToStartTimeout sets the ScheduleToStartTimeout value
func (*MutexActivityOptions) WithStartToCloseTimeout ¶ added in v1.13.0
func (o *MutexActivityOptions) WithStartToCloseTimeout(d time.Duration) *MutexActivityOptions
WithStartToCloseTimeout sets the StartToCloseTimeout value
func (*MutexActivityOptions) WithTaskQueue ¶ added in v1.13.0
func (o *MutexActivityOptions) WithTaskQueue(tq string) *MutexActivityOptions
WithTaskQueue sets the TaskQueue value
func (*MutexActivityOptions) WithWaitForCancellation ¶ added in v1.13.0
func (o *MutexActivityOptions) WithWaitForCancellation(wait bool) *MutexActivityOptions
WithWaitForCancellation sets the WaitForCancellation value
type MutexChildOptions ¶
type MutexChildOptions struct {
// contains filtered or unexported fields
}
MutexChildOptions provides configuration for a child example.mutex.v1.Example.Mutex workflow operation
func NewMutexChildOptions ¶
func NewMutexChildOptions() *MutexChildOptions
NewMutexChildOptions initializes a new MutexChildOptions value
func (*MutexChildOptions) Build ¶ added in v1.13.0
func (o *MutexChildOptions) 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 (*MutexChildOptions) WithChildWorkflowOptions ¶
func (o *MutexChildOptions) WithChildWorkflowOptions(options workflow.ChildWorkflowOptions) *MutexChildOptions
WithChildWorkflowOptions sets the initial go.temporal.io/sdk/workflow.ChildWorkflowOptions
func (*MutexChildOptions) WithExecutionTimeout ¶ added in v1.13.0
func (o *MutexChildOptions) WithExecutionTimeout(d time.Duration) *MutexChildOptions
WithExecutionTimeout sets the WorkflowExecutionTimeout value
func (*MutexChildOptions) WithID ¶ added in v1.13.0
func (o *MutexChildOptions) WithID(id string) *MutexChildOptions
WithID sets the WorkflowID value
func (*MutexChildOptions) WithIDReusePolicy ¶ added in v1.13.0
func (o *MutexChildOptions) WithIDReusePolicy(policy enumsv1.WorkflowIdReusePolicy) *MutexChildOptions
WithIDReusePolicy sets the WorkflowIDReusePolicy value
func (*MutexChildOptions) WithParentClosePolicy ¶ added in v1.13.0
func (o *MutexChildOptions) WithParentClosePolicy(policy enumsv1.ParentClosePolicy) *MutexChildOptions
WithParentClosePolicy sets the WorkflowIDReusePolicy value
func (*MutexChildOptions) WithRetryPolicy ¶ added in v1.13.0
func (o *MutexChildOptions) WithRetryPolicy(policy *temporal.RetryPolicy) *MutexChildOptions
WithRetryPolicy sets the RetryPolicy value
func (*MutexChildOptions) WithRunTimeout ¶ added in v1.13.0
func (o *MutexChildOptions) WithRunTimeout(d time.Duration) *MutexChildOptions
WithRunTimeout sets the WorkflowRunTimeout value
func (*MutexChildOptions) WithSearchAttributes ¶ added in v1.13.0
func (o *MutexChildOptions) WithSearchAttributes(sa map[string]any) *MutexChildOptions
WithSearchAttributes sets the SearchAttributes value
func (*MutexChildOptions) WithTaskQueue ¶ added in v1.13.0
func (o *MutexChildOptions) WithTaskQueue(tq string) *MutexChildOptions
WithTaskQueue sets the TaskQueue value
func (*MutexChildOptions) WithTaskTimeout ¶ added in v1.13.0
func (o *MutexChildOptions) WithTaskTimeout(d time.Duration) *MutexChildOptions
WithTaskTimeout sets the WorkflowTaskTimeout value
func (*MutexChildOptions) WithWaitForCancellation ¶ added in v1.13.0
func (o *MutexChildOptions) WithWaitForCancellation(wait bool) *MutexChildOptions
WithWaitForCancellation sets the WaitForCancellation value
type MutexChildRun ¶
type MutexChildRun struct {
Future workflow.ChildWorkflowFuture
}
MutexChildRun describes a child Mutex workflow run
func MutexChildAsync ¶
func MutexChildAsync(ctx workflow.Context, req *MutexInput, options ...*MutexChildOptions) (*MutexChildRun, error)
MutexChildAsync starts a child example.mutex.v1.Example.Mutex workflow and returns a handle to the child workflow run
func (*MutexChildRun) AcquireLock ¶
func (r *MutexChildRun) AcquireLock(ctx workflow.Context, input *AcquireLockInput) error
AcquireLock sends a(n) "example.mutex.v1.Example.AcquireLock" signal request to the child workflow
func (*MutexChildRun) AcquireLockAsync ¶
func (r *MutexChildRun) AcquireLockAsync(ctx workflow.Context, input *AcquireLockInput) workflow.Future
AcquireLockAsync sends a(n) "example.mutex.v1.Example.AcquireLock" signal request to the child workflow
func (*MutexChildRun) Get ¶
func (r *MutexChildRun) Get(ctx workflow.Context) error
Get blocks until the workflow is completed, returning the response value
func (*MutexChildRun) ReleaseLock ¶
func (r *MutexChildRun) ReleaseLock(ctx workflow.Context, input *ReleaseLockInput) error
ReleaseLock sends a(n) "example.mutex.v1.Example.ReleaseLock" signal request to the child workflow
func (*MutexChildRun) ReleaseLockAsync ¶
func (r *MutexChildRun) ReleaseLockAsync(ctx workflow.Context, input *ReleaseLockInput) workflow.Future
ReleaseLockAsync sends a(n) "example.mutex.v1.Example.ReleaseLock" signal request to the child workflow
func (*MutexChildRun) Select ¶
func (r *MutexChildRun) Select(sel workflow.Selector, fn func(*MutexChildRun)) workflow.Selector
Select adds this completion to the selector. Callback can be nil.
func (*MutexChildRun) SelectStart ¶
func (r *MutexChildRun) SelectStart(sel workflow.Selector, fn func(*MutexChildRun)) workflow.Selector
SelectStart adds waiting for start to the selector. Callback can be nil.
type MutexFuture ¶
MutexFuture describes a(n) example.mutex.v1.Example.Mutex activity execution
func MutexAsync ¶
func MutexAsync(ctx workflow.Context, req *MutexInput, options ...*MutexActivityOptions) *MutexFuture
MutexAsync executes a(n) example.mutex.v1.Example.Mutex activity (asynchronously)
func MutexLocalAsync ¶
func MutexLocalAsync(ctx workflow.Context, req *MutexInput, options ...*MutexLocalActivityOptions) *MutexFuture
MutexLocalAsync executes a(n) example.mutex.v1.Example.Mutex activity (asynchronously, locally)
func (*MutexFuture) Get ¶
func (f *MutexFuture) Get(ctx workflow.Context) error
Get blocks on the activity's completion, returning the response
func (*MutexFuture) Select ¶
func (f *MutexFuture) Select(sel workflow.Selector, fn func(*MutexFuture)) workflow.Selector
Select adds the activity's completion to the selector, callback can be nil
type MutexInput ¶
type MutexInput struct { ResourceId string `protobuf:"bytes,1,opt,name=resource_id,json=resourceId,proto3" json:"resource_id,omitempty"` // contains filtered or unexported fields }
func UnmarshalCliFlagsToMutexInput ¶
func UnmarshalCliFlagsToMutexInput(cmd *v2.Context) (*MutexInput, error)
UnmarshalCliFlagsToMutexInput unmarshals a MutexInput from command line flags
func (*MutexInput) Descriptor
deprecated
func (*MutexInput) Descriptor() ([]byte, []int)
Deprecated: Use MutexInput.ProtoReflect.Descriptor instead.
func (*MutexInput) GetResourceId ¶
func (x *MutexInput) GetResourceId() string
func (*MutexInput) ProtoMessage ¶
func (*MutexInput) ProtoMessage()
func (*MutexInput) ProtoReflect ¶
func (x *MutexInput) ProtoReflect() protoreflect.Message
func (*MutexInput) Reset ¶
func (x *MutexInput) Reset()
func (*MutexInput) String ¶
func (x *MutexInput) String() string
type MutexLocalActivityOptions ¶
type MutexLocalActivityOptions struct {
// contains filtered or unexported fields
}
MutexLocalActivityOptions provides configuration for a(n) example.mutex.v1.Example.Mutex activity
func NewMutexLocalActivityOptions ¶
func NewMutexLocalActivityOptions() *MutexLocalActivityOptions
NewMutexLocalActivityOptions initializes a new MutexLocalActivityOptions value
func (*MutexLocalActivityOptions) Build ¶ added in v1.13.0
Build initializes a workflow.Context with appropriate LocalActivityOptions values derived from schema defaults and any user-defined overrides
func (*MutexLocalActivityOptions) Local ¶
func (o *MutexLocalActivityOptions) Local(fn func(context.Context, *MutexInput) error) *MutexLocalActivityOptions
Local specifies a custom example.mutex.v1.Example.Mutex implementation
func (*MutexLocalActivityOptions) WithLocalActivityOptions ¶
func (o *MutexLocalActivityOptions) WithLocalActivityOptions(options workflow.LocalActivityOptions) *MutexLocalActivityOptions
WithLocalActivityOptions specifies an initial LocalActivityOptions value to which defaults will be applied
func (*MutexLocalActivityOptions) WithRetryPolicy ¶ added in v1.13.0
func (o *MutexLocalActivityOptions) WithRetryPolicy(policy *temporal.RetryPolicy) *MutexLocalActivityOptions
WithRetryPolicy sets the RetryPolicy value
func (*MutexLocalActivityOptions) WithScheduleToCloseTimeout ¶ added in v1.13.0
func (o *MutexLocalActivityOptions) WithScheduleToCloseTimeout(d time.Duration) *MutexLocalActivityOptions
WithScheduleToCloseTimeout sets the ScheduleToCloseTimeout value
func (*MutexLocalActivityOptions) WithStartToCloseTimeout ¶ added in v1.13.0
func (o *MutexLocalActivityOptions) WithStartToCloseTimeout(d time.Duration) *MutexLocalActivityOptions
WithStartToCloseTimeout sets the StartToCloseTimeout value
type MutexOptions ¶
type MutexOptions struct {
// contains filtered or unexported fields
}
MutexOptions provides configuration for a example.mutex.v1.Example.Mutex workflow operation
func NewMutexOptions ¶
func NewMutexOptions() *MutexOptions
NewMutexOptions initializes a new MutexOptions value
func (*MutexOptions) Build ¶ added in v1.13.0
func (o *MutexOptions) Build(req protoreflect.Message) (client.StartWorkflowOptions, error)
Build initializes a new go.temporal.io/sdk/client.StartWorkflowOptions value with defaults and overrides applied
func (*MutexOptions) WithExecutionTimeout ¶ added in v1.13.0
func (o *MutexOptions) WithExecutionTimeout(d time.Duration) *MutexOptions
WithExecutionTimeout sets the WorkflowExecutionTimeout value
func (*MutexOptions) WithID ¶ added in v1.13.0
func (o *MutexOptions) WithID(id string) *MutexOptions
WithID sets the ID value
func (*MutexOptions) WithIDReusePolicy ¶ added in v1.13.0
func (o *MutexOptions) WithIDReusePolicy(policy enumsv1.WorkflowIdReusePolicy) *MutexOptions
WithIDReusePolicy sets the WorkflowIDReusePolicy value
func (*MutexOptions) WithRetryPolicy ¶ added in v1.13.0
func (o *MutexOptions) WithRetryPolicy(policy *temporal.RetryPolicy) *MutexOptions
WithRetryPolicy sets the RetryPolicy value
func (*MutexOptions) WithRunTimeout ¶ added in v1.13.0
func (o *MutexOptions) WithRunTimeout(d time.Duration) *MutexOptions
WithRunTimeout sets the WorkflowRunTimeout value
func (*MutexOptions) WithSearchAttributes ¶ added in v1.13.0
func (o *MutexOptions) WithSearchAttributes(sa map[string]any) *MutexOptions
WithSearchAttributes sets the SearchAttributes value
func (*MutexOptions) WithStartWorkflowOptions ¶
func (o *MutexOptions) WithStartWorkflowOptions(options client.StartWorkflowOptions) *MutexOptions
WithStartWorkflowOptions sets the initial go.temporal.io/sdk/client.StartWorkflowOptions
func (*MutexOptions) WithTaskQueue ¶ added in v1.13.0
func (o *MutexOptions) WithTaskQueue(tq string) *MutexOptions
WithTaskQueue sets the TaskQueue value
func (*MutexOptions) WithTaskTimeout ¶ added in v1.13.0
func (o *MutexOptions) WithTaskTimeout(d time.Duration) *MutexOptions
WithTaskTimeout sets the WorkflowTaskTimeout value
type MutexRun ¶
type MutexRun 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 // example.mutex.v1.Example.AcquireLock sends a(n) example.mutex.v1.Example.AcquireLock signal AcquireLock(ctx context.Context, req *AcquireLockInput) error // example.mutex.v1.Example.ReleaseLock sends a(n) example.mutex.v1.Example.ReleaseLock signal ReleaseLock(ctx context.Context, req *ReleaseLockInput) error }
MutexRun describes a(n) example.mutex.v1.Example.Mutex workflow run
type MutexWorkflow ¶
type MutexWorkflow interface { // Execute defines the entrypoint to a(n) example.mutex.v1.Example.Mutex workflow Execute(ctx workflow.Context) error }
MutexWorkflow describes a(n) example.mutex.v1.Example.Mutex workflow implementation
workflow details: (id: "mutex:${! resourceId }")
type MutexWorkflowInput ¶
type MutexWorkflowInput struct { Req *MutexInput AcquireLock *AcquireLockSignal ReleaseLock *ReleaseLockSignal }
MutexWorkflowInput describes the input to a(n) example.mutex.v1.Example.Mutex workflow constructor
type ReleaseLockInput ¶
type ReleaseLockInput struct { LeaseId string `protobuf:"bytes,1,opt,name=lease_id,json=leaseId,proto3" json:"lease_id,omitempty"` // contains filtered or unexported fields }
func UnmarshalCliFlagsToReleaseLockInput ¶
func UnmarshalCliFlagsToReleaseLockInput(cmd *v2.Context) (*ReleaseLockInput, error)
UnmarshalCliFlagsToReleaseLockInput unmarshals a ReleaseLockInput from command line flags
func (*ReleaseLockInput) Descriptor
deprecated
func (*ReleaseLockInput) Descriptor() ([]byte, []int)
Deprecated: Use ReleaseLockInput.ProtoReflect.Descriptor instead.
func (*ReleaseLockInput) GetLeaseId ¶
func (x *ReleaseLockInput) GetLeaseId() string
func (*ReleaseLockInput) ProtoMessage ¶
func (*ReleaseLockInput) ProtoMessage()
func (*ReleaseLockInput) ProtoReflect ¶
func (x *ReleaseLockInput) ProtoReflect() protoreflect.Message
func (*ReleaseLockInput) Reset ¶
func (x *ReleaseLockInput) Reset()
func (*ReleaseLockInput) String ¶
func (x *ReleaseLockInput) String() string
type ReleaseLockSignal ¶
type ReleaseLockSignal struct {
Channel workflow.ReceiveChannel
}
ReleaseLockSignal describes a(n) example.mutex.v1.Example.ReleaseLock signal
func NewReleaseLockSignal ¶
func NewReleaseLockSignal(ctx workflow.Context) *ReleaseLockSignal
NewReleaseLockSignal initializes a new example.mutex.v1.Example.ReleaseLock signal wrapper
func (*ReleaseLockSignal) Receive ¶
func (s *ReleaseLockSignal) Receive(ctx workflow.Context) (*ReleaseLockInput, bool)
Receive blocks until a(n) example.mutex.v1.Example.ReleaseLock signal is received
func (*ReleaseLockSignal) ReceiveAsync ¶
func (s *ReleaseLockSignal) ReceiveAsync() *ReleaseLockInput
ReceiveAsync checks for a example.mutex.v1.Example.ReleaseLock signal without blocking
func (*ReleaseLockSignal) ReceiveWithTimeout ¶
func (s *ReleaseLockSignal) ReceiveWithTimeout(ctx workflow.Context, timeout time.Duration) (resp *ReleaseLockInput, ok bool, more bool)
ReceiveWithTimeout blocks until a(n) example.mutex.v1.Example.ReleaseLock 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 (*ReleaseLockSignal) Select ¶
func (s *ReleaseLockSignal) Select(sel workflow.Selector, fn func(*ReleaseLockInput)) workflow.Selector
Select checks for a(n) example.mutex.v1.Example.ReleaseLock signal without blocking
type SampleWorkflowWithMutexChildOptions ¶
type SampleWorkflowWithMutexChildOptions struct {
// contains filtered or unexported fields
}
SampleWorkflowWithMutexChildOptions provides configuration for a child example.mutex.v1.Example.SampleWorkflowWithMutex workflow operation
func NewSampleWorkflowWithMutexChildOptions ¶
func NewSampleWorkflowWithMutexChildOptions() *SampleWorkflowWithMutexChildOptions
NewSampleWorkflowWithMutexChildOptions initializes a new SampleWorkflowWithMutexChildOptions value
func (*SampleWorkflowWithMutexChildOptions) Build ¶ added in v1.13.0
func (o *SampleWorkflowWithMutexChildOptions) 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 (*SampleWorkflowWithMutexChildOptions) WithChildWorkflowOptions ¶
func (o *SampleWorkflowWithMutexChildOptions) WithChildWorkflowOptions(options workflow.ChildWorkflowOptions) *SampleWorkflowWithMutexChildOptions
WithChildWorkflowOptions sets the initial go.temporal.io/sdk/workflow.ChildWorkflowOptions
func (*SampleWorkflowWithMutexChildOptions) WithExecutionTimeout ¶ added in v1.13.0
func (o *SampleWorkflowWithMutexChildOptions) WithExecutionTimeout(d time.Duration) *SampleWorkflowWithMutexChildOptions
WithExecutionTimeout sets the WorkflowExecutionTimeout value
func (*SampleWorkflowWithMutexChildOptions) WithID ¶ added in v1.13.0
func (o *SampleWorkflowWithMutexChildOptions) WithID(id string) *SampleWorkflowWithMutexChildOptions
WithID sets the WorkflowID value
func (*SampleWorkflowWithMutexChildOptions) WithIDReusePolicy ¶ added in v1.13.0
func (o *SampleWorkflowWithMutexChildOptions) WithIDReusePolicy(policy enumsv1.WorkflowIdReusePolicy) *SampleWorkflowWithMutexChildOptions
WithIDReusePolicy sets the WorkflowIDReusePolicy value
func (*SampleWorkflowWithMutexChildOptions) WithParentClosePolicy ¶ added in v1.13.0
func (o *SampleWorkflowWithMutexChildOptions) WithParentClosePolicy(policy enumsv1.ParentClosePolicy) *SampleWorkflowWithMutexChildOptions
WithParentClosePolicy sets the WorkflowIDReusePolicy value
func (*SampleWorkflowWithMutexChildOptions) WithRetryPolicy ¶ added in v1.13.0
func (o *SampleWorkflowWithMutexChildOptions) WithRetryPolicy(policy *temporal.RetryPolicy) *SampleWorkflowWithMutexChildOptions
WithRetryPolicy sets the RetryPolicy value
func (*SampleWorkflowWithMutexChildOptions) WithRunTimeout ¶ added in v1.13.0
func (o *SampleWorkflowWithMutexChildOptions) WithRunTimeout(d time.Duration) *SampleWorkflowWithMutexChildOptions
WithRunTimeout sets the WorkflowRunTimeout value
func (*SampleWorkflowWithMutexChildOptions) WithSearchAttributes ¶ added in v1.13.0
func (o *SampleWorkflowWithMutexChildOptions) WithSearchAttributes(sa map[string]any) *SampleWorkflowWithMutexChildOptions
WithSearchAttributes sets the SearchAttributes value
func (*SampleWorkflowWithMutexChildOptions) WithTaskQueue ¶ added in v1.13.0
func (o *SampleWorkflowWithMutexChildOptions) WithTaskQueue(tq string) *SampleWorkflowWithMutexChildOptions
WithTaskQueue sets the TaskQueue value
func (*SampleWorkflowWithMutexChildOptions) WithTaskTimeout ¶ added in v1.13.0
func (o *SampleWorkflowWithMutexChildOptions) WithTaskTimeout(d time.Duration) *SampleWorkflowWithMutexChildOptions
WithTaskTimeout sets the WorkflowTaskTimeout value
func (*SampleWorkflowWithMutexChildOptions) WithWaitForCancellation ¶ added in v1.13.0
func (o *SampleWorkflowWithMutexChildOptions) WithWaitForCancellation(wait bool) *SampleWorkflowWithMutexChildOptions
WithWaitForCancellation sets the WaitForCancellation value
type SampleWorkflowWithMutexChildRun ¶
type SampleWorkflowWithMutexChildRun struct {
Future workflow.ChildWorkflowFuture
}
SampleWorkflowWithMutexChildRun describes a child SampleWorkflowWithMutex workflow run
func SampleWorkflowWithMutexChildAsync ¶
func SampleWorkflowWithMutexChildAsync(ctx workflow.Context, req *SampleWorkflowWithMutexInput, options ...*SampleWorkflowWithMutexChildOptions) (*SampleWorkflowWithMutexChildRun, error)
SampleWorkflowWithMutexChildAsync starts a child example.mutex.v1.Example.SampleWorkflowWithMutex workflow and returns a handle to the child workflow run
func (*SampleWorkflowWithMutexChildRun) Get ¶
func (r *SampleWorkflowWithMutexChildRun) Get(ctx workflow.Context) error
Get blocks until the workflow is completed, returning the response value
func (*SampleWorkflowWithMutexChildRun) LockAcquired ¶
func (r *SampleWorkflowWithMutexChildRun) LockAcquired(ctx workflow.Context, input *LockAcquiredInput) error
LockAcquired sends a(n) "example.mutex.v1.Example.LockAcquired" signal request to the child workflow
func (*SampleWorkflowWithMutexChildRun) LockAcquiredAsync ¶
func (r *SampleWorkflowWithMutexChildRun) LockAcquiredAsync(ctx workflow.Context, input *LockAcquiredInput) workflow.Future
LockAcquiredAsync sends a(n) "example.mutex.v1.Example.LockAcquired" signal request to the child workflow
func (*SampleWorkflowWithMutexChildRun) Select ¶
func (r *SampleWorkflowWithMutexChildRun) Select(sel workflow.Selector, fn func(*SampleWorkflowWithMutexChildRun)) workflow.Selector
Select adds this completion to the selector. Callback can be nil.
func (*SampleWorkflowWithMutexChildRun) SelectStart ¶
func (r *SampleWorkflowWithMutexChildRun) SelectStart(sel workflow.Selector, fn func(*SampleWorkflowWithMutexChildRun)) workflow.Selector
SelectStart adds waiting for start to the selector. Callback can be nil.
type SampleWorkflowWithMutexInput ¶
type SampleWorkflowWithMutexInput struct { ResourceId string `protobuf:"bytes,1,opt,name=resource_id,json=resourceId,proto3" json:"resource_id,omitempty"` Sleep *durationpb.Duration `protobuf:"bytes,2,opt,name=sleep,proto3" json:"sleep,omitempty"` // contains filtered or unexported fields }
func UnmarshalCliFlagsToSampleWorkflowWithMutexInput ¶
func UnmarshalCliFlagsToSampleWorkflowWithMutexInput(cmd *v2.Context) (*SampleWorkflowWithMutexInput, error)
UnmarshalCliFlagsToSampleWorkflowWithMutexInput unmarshals a SampleWorkflowWithMutexInput from command line flags
func (*SampleWorkflowWithMutexInput) Descriptor
deprecated
func (*SampleWorkflowWithMutexInput) Descriptor() ([]byte, []int)
Deprecated: Use SampleWorkflowWithMutexInput.ProtoReflect.Descriptor instead.
func (*SampleWorkflowWithMutexInput) GetResourceId ¶
func (x *SampleWorkflowWithMutexInput) GetResourceId() string
func (*SampleWorkflowWithMutexInput) GetSleep ¶
func (x *SampleWorkflowWithMutexInput) GetSleep() *durationpb.Duration
func (*SampleWorkflowWithMutexInput) ProtoMessage ¶
func (*SampleWorkflowWithMutexInput) ProtoMessage()
func (*SampleWorkflowWithMutexInput) ProtoReflect ¶
func (x *SampleWorkflowWithMutexInput) ProtoReflect() protoreflect.Message
func (*SampleWorkflowWithMutexInput) Reset ¶
func (x *SampleWorkflowWithMutexInput) Reset()
func (*SampleWorkflowWithMutexInput) String ¶
func (x *SampleWorkflowWithMutexInput) String() string
type SampleWorkflowWithMutexOptions ¶
type SampleWorkflowWithMutexOptions struct {
// contains filtered or unexported fields
}
SampleWorkflowWithMutexOptions provides configuration for a example.mutex.v1.Example.SampleWorkflowWithMutex workflow operation
func NewSampleWorkflowWithMutexOptions ¶
func NewSampleWorkflowWithMutexOptions() *SampleWorkflowWithMutexOptions
NewSampleWorkflowWithMutexOptions initializes a new SampleWorkflowWithMutexOptions value
func (*SampleWorkflowWithMutexOptions) Build ¶ added in v1.13.0
func (o *SampleWorkflowWithMutexOptions) Build(req protoreflect.Message) (client.StartWorkflowOptions, error)
Build initializes a new go.temporal.io/sdk/client.StartWorkflowOptions value with defaults and overrides applied
func (*SampleWorkflowWithMutexOptions) WithExecutionTimeout ¶ added in v1.13.0
func (o *SampleWorkflowWithMutexOptions) WithExecutionTimeout(d time.Duration) *SampleWorkflowWithMutexOptions
WithExecutionTimeout sets the WorkflowExecutionTimeout value
func (*SampleWorkflowWithMutexOptions) WithID ¶ added in v1.13.0
func (o *SampleWorkflowWithMutexOptions) WithID(id string) *SampleWorkflowWithMutexOptions
WithID sets the ID value
func (*SampleWorkflowWithMutexOptions) WithIDReusePolicy ¶ added in v1.13.0
func (o *SampleWorkflowWithMutexOptions) WithIDReusePolicy(policy enumsv1.WorkflowIdReusePolicy) *SampleWorkflowWithMutexOptions
WithIDReusePolicy sets the WorkflowIDReusePolicy value
func (*SampleWorkflowWithMutexOptions) WithRetryPolicy ¶ added in v1.13.0
func (o *SampleWorkflowWithMutexOptions) WithRetryPolicy(policy *temporal.RetryPolicy) *SampleWorkflowWithMutexOptions
WithRetryPolicy sets the RetryPolicy value
func (*SampleWorkflowWithMutexOptions) WithRunTimeout ¶ added in v1.13.0
func (o *SampleWorkflowWithMutexOptions) WithRunTimeout(d time.Duration) *SampleWorkflowWithMutexOptions
WithRunTimeout sets the WorkflowRunTimeout value
func (*SampleWorkflowWithMutexOptions) WithSearchAttributes ¶ added in v1.13.0
func (o *SampleWorkflowWithMutexOptions) WithSearchAttributes(sa map[string]any) *SampleWorkflowWithMutexOptions
WithSearchAttributes sets the SearchAttributes value
func (*SampleWorkflowWithMutexOptions) WithStartWorkflowOptions ¶
func (o *SampleWorkflowWithMutexOptions) WithStartWorkflowOptions(options client.StartWorkflowOptions) *SampleWorkflowWithMutexOptions
WithStartWorkflowOptions sets the initial go.temporal.io/sdk/client.StartWorkflowOptions
func (*SampleWorkflowWithMutexOptions) WithTaskQueue ¶ added in v1.13.0
func (o *SampleWorkflowWithMutexOptions) WithTaskQueue(tq string) *SampleWorkflowWithMutexOptions
WithTaskQueue sets the TaskQueue value
func (*SampleWorkflowWithMutexOptions) WithTaskTimeout ¶ added in v1.13.0
func (o *SampleWorkflowWithMutexOptions) WithTaskTimeout(d time.Duration) *SampleWorkflowWithMutexOptions
WithTaskTimeout sets the WorkflowTaskTimeout value
type SampleWorkflowWithMutexRun ¶
type SampleWorkflowWithMutexRun 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 // example.mutex.v1.Example.LockAcquired sends a(n) example.mutex.v1.Example.LockAcquired signal LockAcquired(ctx context.Context, req *LockAcquiredInput) error }
SampleWorkflowWithMutexRun describes a(n) example.mutex.v1.Example.SampleWorkflowWithMutex workflow run
type SampleWorkflowWithMutexWorkflow ¶
type SampleWorkflowWithMutexWorkflow interface { // Execute defines the entrypoint to a(n) example.mutex.v1.Example.SampleWorkflowWithMutex workflow Execute(ctx workflow.Context) error }
SampleWorkflowWithMutexWorkflow describes a(n) example.mutex.v1.Example.SampleWorkflowWithMutex workflow implementation
workflow details: (id: "SampleWorkflow1WithMutex_${! uuid_v4() }")
type SampleWorkflowWithMutexWorkflowInput ¶
type SampleWorkflowWithMutexWorkflowInput struct { Req *SampleWorkflowWithMutexInput LockAcquired *LockAcquiredSignal }
SampleWorkflowWithMutexWorkflowInput describes the input to a(n) example.mutex.v1.Example.SampleWorkflowWithMutex 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) AcquireLock ¶
func (c *TestExampleClient) AcquireLock(ctx context.Context, workflowID string, runID string, req *AcquireLockInput) error
AcquireLock executes a example.mutex.v1.Example.AcquireLock signal
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) GetSampleWorkflowWithMutex ¶
func (c *TestExampleClient) GetSampleWorkflowWithMutex(ctx context.Context, workflowID string, runID string) SampleWorkflowWithMutexRun
GetSampleWorkflowWithMutex is a noop
func (*TestExampleClient) LockAcquired ¶
func (c *TestExampleClient) LockAcquired(ctx context.Context, workflowID string, runID string, req *LockAcquiredInput) error
LockAcquired executes a example.mutex.v1.Example.LockAcquired signal
func (*TestExampleClient) Mutex ¶
func (c *TestExampleClient) Mutex(ctx context.Context, req *MutexInput, opts ...*MutexOptions) error
Mutex executes a(n) example.mutex.v1.Example.Mutex workflow in the test environment
func (*TestExampleClient) MutexAsync ¶
func (c *TestExampleClient) MutexAsync(ctx context.Context, req *MutexInput, options ...*MutexOptions) (MutexRun, error)
MutexAsync executes a(n) example.mutex.v1.Example.Mutex workflow in the test environment
func (*TestExampleClient) MutexWithAcquireLock ¶
func (c *TestExampleClient) MutexWithAcquireLock(ctx context.Context, req *MutexInput, signal *AcquireLockInput, opts ...*MutexOptions) error
MutexWithAcquireLock sends a(n) example.mutex.v1.Example.AcquireLock signal to a(n) example.mutex.v1.Example.Mutex workflow, starting it if necessary
func (*TestExampleClient) MutexWithAcquireLockAsync ¶
func (c *TestExampleClient) MutexWithAcquireLockAsync(ctx context.Context, req *MutexInput, signal *AcquireLockInput, opts ...*MutexOptions) (MutexRun, error)
MutexWithAcquireLockAsync sends a(n) example.mutex.v1.Example.AcquireLock signal to a(n) example.mutex.v1.Example.Mutex workflow, starting it if necessary
func (*TestExampleClient) ReleaseLock ¶
func (c *TestExampleClient) ReleaseLock(ctx context.Context, workflowID string, runID string, req *ReleaseLockInput) error
ReleaseLock executes a example.mutex.v1.Example.ReleaseLock signal
func (*TestExampleClient) SampleWorkflowWithMutex ¶
func (c *TestExampleClient) SampleWorkflowWithMutex(ctx context.Context, req *SampleWorkflowWithMutexInput, opts ...*SampleWorkflowWithMutexOptions) error
SampleWorkflowWithMutex executes a(n) example.mutex.v1.Example.SampleWorkflowWithMutex workflow in the test environment
func (*TestExampleClient) SampleWorkflowWithMutexAsync ¶
func (c *TestExampleClient) SampleWorkflowWithMutexAsync(ctx context.Context, req *SampleWorkflowWithMutexInput, options ...*SampleWorkflowWithMutexOptions) (SampleWorkflowWithMutexRun, error)
SampleWorkflowWithMutexAsync executes a(n) example.mutex.v1.Example.SampleWorkflowWithMutex 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. |