Documentation
¶
Overview ¶
Code generated by protoc-gen-go_temporal. DO NOT EDIT. versions:
protoc-gen-go_temporal 0.6.2-next (5cc7a59beb1e3de5a59cb1721ef6168b4d036e86) go go1.19.6 protoc (unknown)
source: example.proto
Index ¶
- Constants
- Variables
- func AcquireLeaseExternal(ctx workflow.Context, workflowID string, runID string, req *AcquireLeaseSignal) workflow.Future
- func LeaseAcquiredExternal(ctx workflow.Context, workflowID string, runID string, ...) workflow.Future
- func RegisterActivities(r worker.Registry, activities Activities)
- func RegisterMutexActivity(r worker.Registry, fn func(context.Context, *MutexRequest) error)
- func RegisterMutexWorkflow(r worker.Registry, ...)
- func RegisterSampleWorkflowWithMutexWorkflow(r worker.Registry, ...)
- func RegisterWorkflows(r worker.Registry, workflows Workflows)
- func RenewLeaseExternal(ctx workflow.Context, workflowID string, runID string, req *RenewLeaseSignal) workflow.Future
- func RevokeLeaseExternal(ctx workflow.Context, workflowID string, runID string, req *RevokeLeaseSignal) workflow.Future
- type AcquireLease
- type AcquireLeaseSignal
- func (*AcquireLeaseSignal) Descriptor() ([]byte, []int)deprecated
- func (x *AcquireLeaseSignal) GetTimeout() *durationpb.Duration
- func (x *AcquireLeaseSignal) GetWorkflowId() string
- func (*AcquireLeaseSignal) ProtoMessage()
- func (x *AcquireLeaseSignal) ProtoReflect() protoreflect.Message
- func (x *AcquireLeaseSignal) Reset()
- func (x *AcquireLeaseSignal) String() string
- type Activities
- type Client
- type LeaseAcquired
- type LeaseAcquiredSignal
- func (*LeaseAcquiredSignal) Descriptor() ([]byte, []int)deprecated
- func (x *LeaseAcquiredSignal) GetLeaseId() string
- func (x *LeaseAcquiredSignal) GetRunId() string
- func (x *LeaseAcquiredSignal) GetWorkflowId() string
- func (*LeaseAcquiredSignal) ProtoMessage()
- func (x *LeaseAcquiredSignal) ProtoReflect() protoreflect.Message
- func (x *LeaseAcquiredSignal) Reset()
- func (x *LeaseAcquiredSignal) String() string
- type MutexChildRun
- func (r *MutexChildRun) AcquireLease(ctx workflow.Context, input *AcquireLeaseSignal) workflow.Future
- func (r *MutexChildRun) Get(ctx workflow.Context) error
- func (r *MutexChildRun) RenewLease(ctx workflow.Context, input *RenewLeaseSignal) workflow.Future
- func (r *MutexChildRun) RevokeLease(ctx workflow.Context, input *RevokeLeaseSignal) 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 MutexRequest
- type MutexRun
- type MutexWorkflow
- type RenewLease
- type RenewLeaseSignal
- func (*RenewLeaseSignal) Descriptor() ([]byte, []int)deprecated
- func (x *RenewLeaseSignal) GetLeaseId() string
- func (x *RenewLeaseSignal) GetTimeout() *durationpb.Duration
- func (*RenewLeaseSignal) ProtoMessage()
- func (x *RenewLeaseSignal) ProtoReflect() protoreflect.Message
- func (x *RenewLeaseSignal) Reset()
- func (x *RenewLeaseSignal) String() string
- type RevokeLease
- type RevokeLeaseSignal
- type SampleWorkflowWithMutexChildRun
- func (r *SampleWorkflowWithMutexChildRun) Get(ctx workflow.Context) (*SampleWorkflowWithMutexResponse, error)
- func (r *SampleWorkflowWithMutexChildRun) LeaseAcquired(ctx workflow.Context, input *LeaseAcquiredSignal) 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
- type SampleWorkflowWithMutexRequest
- func (*SampleWorkflowWithMutexRequest) Descriptor() ([]byte, []int)deprecated
- func (x *SampleWorkflowWithMutexRequest) GetAmount() float64
- func (x *SampleWorkflowWithMutexRequest) GetDest() string
- func (x *SampleWorkflowWithMutexRequest) GetResource() string
- func (*SampleWorkflowWithMutexRequest) ProtoMessage()
- func (x *SampleWorkflowWithMutexRequest) ProtoReflect() protoreflect.Message
- func (x *SampleWorkflowWithMutexRequest) Reset()
- func (x *SampleWorkflowWithMutexRequest) String() string
- type SampleWorkflowWithMutexResponse
- func (*SampleWorkflowWithMutexResponse) Descriptor() ([]byte, []int)deprecated
- func (x *SampleWorkflowWithMutexResponse) GetResult() string
- func (*SampleWorkflowWithMutexResponse) ProtoMessage()
- func (x *SampleWorkflowWithMutexResponse) ProtoReflect() protoreflect.Message
- func (x *SampleWorkflowWithMutexResponse) Reset()
- func (x *SampleWorkflowWithMutexResponse) String() string
- type SampleWorkflowWithMutexRun
- type SampleWorkflowWithMutexWorkflow
- type Workflows
Constants ¶
const ( MutexWorkflowName = "mycompany.mutex.v1.Mutex.MutexWorkflow" SampleWorkflowWithMutexWorkflowName = "mycompany.mutex.v1.Mutex.SampleWorkflowWithMutexWorkflow" )
Mutex workflow names
const ( AcquireLeaseSignalName = "mycompany.mutex.v1.Mutex.AcquireLeaseSignal" LeaseAcquiredSignalName = "mycompany.mutex.v1.Mutex.LeaseAcquiredSignal" RenewLeaseSignalName = "mycompany.mutex.v1.Mutex.RenewLeaseSignal" RevokeLeaseSignalName = "mycompany.mutex.v1.Mutex.RevokeLeaseSignal" )
Mutex signal names
const (
MutexActivityName = "mycompany.mutex.v1.Mutex.MutexActivity"
)
Mutex activity names
const MutexTaskQueue = "mutex-v1"
MutexTaskQueue is the default task-queue for a Mutex worker
Variables ¶
var ( MutexIDExpression = expression.MustParseExpression("mutex/${!resource}") SampleWorkflowWithMutexIDExpression = expression.MustParseExpression("sample-workflow-with-mutex/${!resource}/${!uuid_v4()}") )
Mutex id expressions
var File_example_proto protoreflect.FileDescriptor
Functions ¶
func AcquireLeaseExternal ¶
func AcquireLeaseExternal(ctx workflow.Context, workflowID string, runID string, req *AcquireLeaseSignal) workflow.Future
AcquireLeaseExternal sends a AcquireLease signal to an existing workflow
func LeaseAcquiredExternal ¶
func LeaseAcquiredExternal(ctx workflow.Context, workflowID string, runID string, req *LeaseAcquiredSignal) workflow.Future
LeaseAcquiredExternal sends a LeaseAcquired signal to an existing workflow
func RegisterActivities ¶
func RegisterActivities(r worker.Registry, activities Activities)
RegisterActivities registers activities with a worker
func RegisterMutexActivity ¶
RegisterMutexActivity registers a Mutex activity
func RegisterMutexWorkflow ¶
func RegisterMutexWorkflow(r worker.Registry, wf func(workflow.Context, *MutexInput) (MutexWorkflow, error))
RegisterMutexWorkflow registers a Mutex workflow with the given worker
func RegisterSampleWorkflowWithMutexWorkflow ¶
func RegisterSampleWorkflowWithMutexWorkflow(r worker.Registry, wf func(workflow.Context, *SampleWorkflowWithMutexInput) (SampleWorkflowWithMutexWorkflow, error))
RegisterSampleWorkflowWithMutexWorkflow registers a SampleWorkflowWithMutex workflow with the given worker
func RegisterWorkflows ¶
RegisterWorkflows registers Mutex workflows with the given worker
func RenewLeaseExternal ¶
func RenewLeaseExternal(ctx workflow.Context, workflowID string, runID string, req *RenewLeaseSignal) workflow.Future
RenewLeaseExternal sends a RenewLease signal to an existing workflow
func RevokeLeaseExternal ¶
func RevokeLeaseExternal(ctx workflow.Context, workflowID string, runID string, req *RevokeLeaseSignal) workflow.Future
RevokeLeaseExternal sends a RevokeLease signal to an existing workflow
Types ¶
type AcquireLease ¶
type AcquireLease struct {
Channel workflow.ReceiveChannel
}
AcquireLease describes a AcquireLease signal
func (*AcquireLease) Receive ¶
func (s *AcquireLease) Receive(ctx workflow.Context) (*AcquireLeaseSignal, bool)
Receive blocks until a AcquireLease signal is received
func (*AcquireLease) ReceiveAsync ¶
func (s *AcquireLease) ReceiveAsync() *AcquireLeaseSignal
ReceiveAsync checks for a AcquireLease signal without blocking
func (*AcquireLease) Select ¶
func (s *AcquireLease) Select(sel workflow.Selector, fn func(*AcquireLeaseSignal)) workflow.Selector
Select checks for a AcquireLease signal without blocking
type AcquireLeaseSignal ¶
type AcquireLeaseSignal 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 (*AcquireLeaseSignal) Descriptor
deprecated
func (*AcquireLeaseSignal) Descriptor() ([]byte, []int)
Deprecated: Use AcquireLeaseSignal.ProtoReflect.Descriptor instead.
func (*AcquireLeaseSignal) GetTimeout ¶
func (x *AcquireLeaseSignal) GetTimeout() *durationpb.Duration
func (*AcquireLeaseSignal) GetWorkflowId ¶
func (x *AcquireLeaseSignal) GetWorkflowId() string
func (*AcquireLeaseSignal) ProtoMessage ¶
func (*AcquireLeaseSignal) ProtoMessage()
func (*AcquireLeaseSignal) ProtoReflect ¶
func (x *AcquireLeaseSignal) ProtoReflect() protoreflect.Message
func (*AcquireLeaseSignal) Reset ¶
func (x *AcquireLeaseSignal) Reset()
func (*AcquireLeaseSignal) String ¶
func (x *AcquireLeaseSignal) String() string
type Activities ¶
type Activities interface {
// Mutex provides a mutex over a shared resource
Mutex(ctx context.Context, req *MutexRequest) error
}
Activities describes available worker activites
type Client ¶
type Client interface {
// Mutex executes a Mutex workflow and blocks until error or response received
Mutex(ctx context.Context, opts *client.StartWorkflowOptions, req *MutexRequest) error
// ExecuteMutex executes a Mutex workflow
ExecuteMutex(ctx context.Context, opts *client.StartWorkflowOptions, req *MutexRequest) (MutexRun, error)
// GetMutex retrieves a Mutex workflow execution
GetMutex(ctx context.Context, workflowID string, runID string) (MutexRun, error)
// StartMutexWithAcquireLease sends a AcquireLease signal to a Mutex workflow, starting it if not present
StartMutexWithAcquireLease(ctx context.Context, opts *client.StartWorkflowOptions, req *MutexRequest, signal *AcquireLeaseSignal) (MutexRun, error)
// SampleWorkflowWithMutex executes a SampleWorkflowWithMutex workflow and blocks until error or response received
SampleWorkflowWithMutex(ctx context.Context, opts *client.StartWorkflowOptions, req *SampleWorkflowWithMutexRequest) (*SampleWorkflowWithMutexResponse, error)
// ExecuteSampleWorkflowWithMutex executes a SampleWorkflowWithMutex workflow
ExecuteSampleWorkflowWithMutex(ctx context.Context, opts *client.StartWorkflowOptions, req *SampleWorkflowWithMutexRequest) (SampleWorkflowWithMutexRun, error)
// GetSampleWorkflowWithMutex retrieves a SampleWorkflowWithMutex workflow execution
GetSampleWorkflowWithMutex(ctx context.Context, workflowID string, runID string) (SampleWorkflowWithMutexRun, error)
// AcquireLease sends a AcquireLease signal to an existing workflow
AcquireLease(ctx context.Context, workflowID string, runID string, signal *AcquireLeaseSignal) error
// LeaseAcquired sends a LeaseAcquired signal to an existing workflow
LeaseAcquired(ctx context.Context, workflowID string, runID string, signal *LeaseAcquiredSignal) error
// RenewLease sends a RenewLease signal to an existing workflow
RenewLease(ctx context.Context, workflowID string, runID string, signal *RenewLeaseSignal) error
// RevokeLease sends a RevokeLease signal to an existing workflow
RevokeLease(ctx context.Context, workflowID string, runID string, signal *RevokeLeaseSignal) error
}
Client describes a client for a Mutex worker
type LeaseAcquired ¶
type LeaseAcquired struct {
Channel workflow.ReceiveChannel
}
LeaseAcquired describes a LeaseAcquired signal
func (*LeaseAcquired) Receive ¶
func (s *LeaseAcquired) Receive(ctx workflow.Context) (*LeaseAcquiredSignal, bool)
Receive blocks until a LeaseAcquired signal is received
func (*LeaseAcquired) ReceiveAsync ¶
func (s *LeaseAcquired) ReceiveAsync() *LeaseAcquiredSignal
ReceiveAsync checks for a LeaseAcquired signal without blocking
func (*LeaseAcquired) Select ¶
func (s *LeaseAcquired) Select(sel workflow.Selector, fn func(*LeaseAcquiredSignal)) workflow.Selector
Select checks for a LeaseAcquired signal without blocking
type LeaseAcquiredSignal ¶
type LeaseAcquiredSignal struct {
WorkflowId string `protobuf:"bytes,1,opt,name=workflow_id,json=workflowId,proto3" json:"workflow_id,omitempty"`
RunId string `protobuf:"bytes,2,opt,name=run_id,json=runId,proto3" json:"run_id,omitempty"`
LeaseId string `protobuf:"bytes,3,opt,name=lease_id,json=leaseId,proto3" json:"lease_id,omitempty"`
// contains filtered or unexported fields
}
func (*LeaseAcquiredSignal) Descriptor
deprecated
func (*LeaseAcquiredSignal) Descriptor() ([]byte, []int)
Deprecated: Use LeaseAcquiredSignal.ProtoReflect.Descriptor instead.
func (*LeaseAcquiredSignal) GetLeaseId ¶
func (x *LeaseAcquiredSignal) GetLeaseId() string
func (*LeaseAcquiredSignal) GetRunId ¶
func (x *LeaseAcquiredSignal) GetRunId() string
func (*LeaseAcquiredSignal) GetWorkflowId ¶
func (x *LeaseAcquiredSignal) GetWorkflowId() string
func (*LeaseAcquiredSignal) ProtoMessage ¶
func (*LeaseAcquiredSignal) ProtoMessage()
func (*LeaseAcquiredSignal) ProtoReflect ¶
func (x *LeaseAcquiredSignal) ProtoReflect() protoreflect.Message
func (*LeaseAcquiredSignal) Reset ¶
func (x *LeaseAcquiredSignal) Reset()
func (*LeaseAcquiredSignal) String ¶
func (x *LeaseAcquiredSignal) String() string
type MutexChildRun ¶
type MutexChildRun struct {
Future workflow.ChildWorkflowFuture
}
MutexChildRun describes a child Mutex workflow run
func MutexChild ¶
func MutexChild(ctx workflow.Context, opts *workflow.ChildWorkflowOptions, req *MutexRequest) MutexChildRun
MutexChild executes a child Mutex workflow
func (*MutexChildRun) AcquireLease ¶
func (r *MutexChildRun) AcquireLease(ctx workflow.Context, input *AcquireLeaseSignal) workflow.Future
AcquireLease sends the corresponding 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) RenewLease ¶
func (r *MutexChildRun) RenewLease(ctx workflow.Context, input *RenewLeaseSignal) workflow.Future
RenewLease sends the corresponding signal request to the child workflow
func (*MutexChildRun) RevokeLease ¶
func (r *MutexChildRun) RevokeLease(ctx workflow.Context, input *RevokeLeaseSignal) workflow.Future
RevokeLease sends the corresponding 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 Mutex activity execution
func Mutex ¶
func Mutex(ctx workflow.Context, opts *workflow.ActivityOptions, req *MutexRequest) *MutexFuture
Mutex provides a mutex over a shared resource
func MutexLocal ¶
func MutexLocal(ctx workflow.Context, opts *workflow.LocalActivityOptions, fn func(context.Context, *MutexRequest) error, req *MutexRequest) *MutexFuture
Mutex provides a mutex over a shared resource
func (*MutexFuture) Get ¶
func (f *MutexFuture) Get(ctx workflow.Context) error
Get blocks on a Mutex execution, returning the response
func (*MutexFuture) Select ¶
func (f *MutexFuture) Select(sel workflow.Selector, fn func(*MutexFuture)) workflow.Selector
Select adds the Mutex completion to the selector, callback can be nil
type MutexInput ¶
type MutexInput struct {
Req *MutexRequest
AcquireLease *AcquireLease
RenewLease *RenewLease
RevokeLease *RevokeLease
}
MutexInput describes the input to a Mutex workflow constructor
type MutexRequest ¶
type MutexRequest struct {
Resource string `protobuf:"bytes,1,opt,name=resource,proto3" json:"resource,omitempty"`
// contains filtered or unexported fields
}
func (*MutexRequest) Descriptor
deprecated
func (*MutexRequest) Descriptor() ([]byte, []int)
Deprecated: Use MutexRequest.ProtoReflect.Descriptor instead.
func (*MutexRequest) GetResource ¶
func (x *MutexRequest) GetResource() string
func (*MutexRequest) ProtoMessage ¶
func (*MutexRequest) ProtoMessage()
func (*MutexRequest) ProtoReflect ¶
func (x *MutexRequest) ProtoReflect() protoreflect.Message
func (*MutexRequest) Reset ¶
func (x *MutexRequest) Reset()
func (*MutexRequest) String ¶
func (x *MutexRequest) String() string
type MutexRun ¶
type MutexRun interface {
// ID returns the workflow ID
ID() string
// RunID returns the workflow instance ID
RunID() string
// Get blocks until the workflow is complete and returns the result
Get(ctx context.Context) error
// AcquireLease sends a AcquireLease signal to the workflow
AcquireLease(ctx context.Context, req *AcquireLeaseSignal) error
// RenewLease sends a RenewLease signal to the workflow
RenewLease(ctx context.Context, req *RenewLeaseSignal) error
// RevokeLease sends a RevokeLease signal to the workflow
RevokeLease(ctx context.Context, req *RevokeLeaseSignal) error
}
MutexRun describes a Mutex workflow run
type MutexWorkflow ¶
MutexWorkflow describes a Mutex workflow implementation
type RenewLease ¶
type RenewLease struct {
Channel workflow.ReceiveChannel
}
RenewLease describes a RenewLease signal
func (*RenewLease) Receive ¶
func (s *RenewLease) Receive(ctx workflow.Context) (*RenewLeaseSignal, bool)
Receive blocks until a RenewLease signal is received
func (*RenewLease) ReceiveAsync ¶
func (s *RenewLease) ReceiveAsync() *RenewLeaseSignal
ReceiveAsync checks for a RenewLease signal without blocking
func (*RenewLease) Select ¶
func (s *RenewLease) Select(sel workflow.Selector, fn func(*RenewLeaseSignal)) workflow.Selector
Select checks for a RenewLease signal without blocking
type RenewLeaseSignal ¶
type RenewLeaseSignal struct {
LeaseId string `protobuf:"bytes,1,opt,name=lease_id,json=leaseId,proto3" json:"lease_id,omitempty"`
Timeout *durationpb.Duration `protobuf:"bytes,2,opt,name=timeout,proto3" json:"timeout,omitempty"`
// contains filtered or unexported fields
}
func (*RenewLeaseSignal) Descriptor
deprecated
func (*RenewLeaseSignal) Descriptor() ([]byte, []int)
Deprecated: Use RenewLeaseSignal.ProtoReflect.Descriptor instead.
func (*RenewLeaseSignal) GetLeaseId ¶
func (x *RenewLeaseSignal) GetLeaseId() string
func (*RenewLeaseSignal) GetTimeout ¶
func (x *RenewLeaseSignal) GetTimeout() *durationpb.Duration
func (*RenewLeaseSignal) ProtoMessage ¶
func (*RenewLeaseSignal) ProtoMessage()
func (*RenewLeaseSignal) ProtoReflect ¶
func (x *RenewLeaseSignal) ProtoReflect() protoreflect.Message
func (*RenewLeaseSignal) Reset ¶
func (x *RenewLeaseSignal) Reset()
func (*RenewLeaseSignal) String ¶
func (x *RenewLeaseSignal) String() string
type RevokeLease ¶
type RevokeLease struct {
Channel workflow.ReceiveChannel
}
RevokeLease describes a RevokeLease signal
func (*RevokeLease) Receive ¶
func (s *RevokeLease) Receive(ctx workflow.Context) (*RevokeLeaseSignal, bool)
Receive blocks until a RevokeLease signal is received
func (*RevokeLease) ReceiveAsync ¶
func (s *RevokeLease) ReceiveAsync() *RevokeLeaseSignal
ReceiveAsync checks for a RevokeLease signal without blocking
func (*RevokeLease) Select ¶
func (s *RevokeLease) Select(sel workflow.Selector, fn func(*RevokeLeaseSignal)) workflow.Selector
Select checks for a RevokeLease signal without blocking
type RevokeLeaseSignal ¶
type RevokeLeaseSignal struct {
LeaseId string `protobuf:"bytes,1,opt,name=lease_id,json=leaseId,proto3" json:"lease_id,omitempty"`
// contains filtered or unexported fields
}
func (*RevokeLeaseSignal) Descriptor
deprecated
func (*RevokeLeaseSignal) Descriptor() ([]byte, []int)
Deprecated: Use RevokeLeaseSignal.ProtoReflect.Descriptor instead.
func (*RevokeLeaseSignal) GetLeaseId ¶
func (x *RevokeLeaseSignal) GetLeaseId() string
func (*RevokeLeaseSignal) ProtoMessage ¶
func (*RevokeLeaseSignal) ProtoMessage()
func (*RevokeLeaseSignal) ProtoReflect ¶
func (x *RevokeLeaseSignal) ProtoReflect() protoreflect.Message
func (*RevokeLeaseSignal) Reset ¶
func (x *RevokeLeaseSignal) Reset()
func (*RevokeLeaseSignal) String ¶
func (x *RevokeLeaseSignal) String() string
type SampleWorkflowWithMutexChildRun ¶
type SampleWorkflowWithMutexChildRun struct {
Future workflow.ChildWorkflowFuture
}
SampleWorkflowWithMutexChildRun describes a child SampleWorkflowWithMutex workflow run
func SampleWorkflowWithMutexChild ¶
func SampleWorkflowWithMutexChild(ctx workflow.Context, opts *workflow.ChildWorkflowOptions, req *SampleWorkflowWithMutexRequest) SampleWorkflowWithMutexChildRun
SampleWorkflowWithMutexChild executes a child SampleWorkflowWithMutex workflow
func (*SampleWorkflowWithMutexChildRun) Get ¶
func (r *SampleWorkflowWithMutexChildRun) Get(ctx workflow.Context) (*SampleWorkflowWithMutexResponse, error)
Get blocks until the workflow is completed, returning the response value
func (*SampleWorkflowWithMutexChildRun) LeaseAcquired ¶
func (r *SampleWorkflowWithMutexChildRun) LeaseAcquired(ctx workflow.Context, input *LeaseAcquiredSignal) workflow.Future
LeaseAcquired sends the corresponding 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 {
Req *SampleWorkflowWithMutexRequest
LeaseAcquired *LeaseAcquired
}
SampleWorkflowWithMutexInput describes the input to a SampleWorkflowWithMutex workflow constructor
type SampleWorkflowWithMutexRequest ¶
type SampleWorkflowWithMutexRequest struct {
Resource string `protobuf:"bytes,1,opt,name=resource,proto3" json:"resource,omitempty"`
Dest string `protobuf:"bytes,2,opt,name=dest,proto3" json:"dest,omitempty"`
Amount float64 `protobuf:"fixed64,3,opt,name=amount,proto3" json:"amount,omitempty"`
// contains filtered or unexported fields
}
func (*SampleWorkflowWithMutexRequest) Descriptor
deprecated
func (*SampleWorkflowWithMutexRequest) Descriptor() ([]byte, []int)
Deprecated: Use SampleWorkflowWithMutexRequest.ProtoReflect.Descriptor instead.
func (*SampleWorkflowWithMutexRequest) GetAmount ¶
func (x *SampleWorkflowWithMutexRequest) GetAmount() float64
func (*SampleWorkflowWithMutexRequest) GetDest ¶
func (x *SampleWorkflowWithMutexRequest) GetDest() string
func (*SampleWorkflowWithMutexRequest) GetResource ¶
func (x *SampleWorkflowWithMutexRequest) GetResource() string
func (*SampleWorkflowWithMutexRequest) ProtoMessage ¶
func (*SampleWorkflowWithMutexRequest) ProtoMessage()
func (*SampleWorkflowWithMutexRequest) ProtoReflect ¶
func (x *SampleWorkflowWithMutexRequest) ProtoReflect() protoreflect.Message
func (*SampleWorkflowWithMutexRequest) Reset ¶
func (x *SampleWorkflowWithMutexRequest) Reset()
func (*SampleWorkflowWithMutexRequest) String ¶
func (x *SampleWorkflowWithMutexRequest) String() string
type SampleWorkflowWithMutexResponse ¶
type SampleWorkflowWithMutexResponse struct {
Result string `protobuf:"bytes,1,opt,name=result,proto3" json:"result,omitempty"`
// contains filtered or unexported fields
}
func (*SampleWorkflowWithMutexResponse) Descriptor
deprecated
func (*SampleWorkflowWithMutexResponse) Descriptor() ([]byte, []int)
Deprecated: Use SampleWorkflowWithMutexResponse.ProtoReflect.Descriptor instead.
func (*SampleWorkflowWithMutexResponse) GetResult ¶
func (x *SampleWorkflowWithMutexResponse) GetResult() string
func (*SampleWorkflowWithMutexResponse) ProtoMessage ¶
func (*SampleWorkflowWithMutexResponse) ProtoMessage()
func (*SampleWorkflowWithMutexResponse) ProtoReflect ¶
func (x *SampleWorkflowWithMutexResponse) ProtoReflect() protoreflect.Message
func (*SampleWorkflowWithMutexResponse) Reset ¶
func (x *SampleWorkflowWithMutexResponse) Reset()
func (*SampleWorkflowWithMutexResponse) String ¶
func (x *SampleWorkflowWithMutexResponse) String() string
type SampleWorkflowWithMutexRun ¶
type SampleWorkflowWithMutexRun interface {
// ID returns the workflow ID
ID() string
// RunID returns the workflow instance ID
RunID() string
// Get blocks until the workflow is complete and returns the result
Get(ctx context.Context) (*SampleWorkflowWithMutexResponse, error)
// LeaseAcquired sends a LeaseAcquired signal to the workflow
LeaseAcquired(ctx context.Context, req *LeaseAcquiredSignal) error
}
SampleWorkflowWithMutexRun describes a SampleWorkflowWithMutex workflow run
type SampleWorkflowWithMutexWorkflow ¶
type SampleWorkflowWithMutexWorkflow interface {
// Execute a SampleWorkflowWithMutex workflow
Execute(ctx workflow.Context) (*SampleWorkflowWithMutexResponse, error)
}
SampleWorkflowWithMutexWorkflow describes a SampleWorkflowWithMutex workflow implementation
type Workflows ¶
type Workflows interface {
// Mutex initializes a new MutexWorkflow value
Mutex(ctx workflow.Context, input *MutexInput) (MutexWorkflow, error)
// SampleWorkflowWithMutex initializes a new SampleWorkflowWithMutexWorkflow value
SampleWorkflowWithMutex(ctx workflow.Context, input *SampleWorkflowWithMutexInput) (SampleWorkflowWithMutexWorkflow, error)
}
Workflows provides methods for initializing new Mutex workflow values