Documentation ¶
Overview ¶
Code generated by protoc-gen-go_temporal. DO NOT EDIT. versions:
protoc-gen-go_temporal 1.10.5-next (9d5c2701e8344e816968344b726d8cac8030f885) go go1.22.1 protoc (unknown)
source: example/mutex/v1/mutex.proto
Index ¶
- func AcquireLock(ctx workflow.Context, workflowID string, runID string, ...) error
- func CancelExampleWorkflow(ctx workflow.Context, workflowID string, runID string) error
- func CancelExampleWorkflowAsync(ctx workflow.Context, workflowID string, runID string) workflow.Future
- func LockAcquired(ctx workflow.Context, workflowID string, runID string, ...) error
- func Mutex(ctx workflow.Context, req *v1.MutexInput, opts ...*MutexWorkflowOptions) error
- func MutexWithAcquireLock(ctx workflow.Context, req *v1.MutexInput, signal *v1.AcquireLockInput, ...) error
- func RegisterExampleActivities(r worker.ActivityRegistry, c v1.ExampleClient, options ...*ExampleOptions)
- func ReleaseLock(ctx workflow.Context, workflowID string, runID string, ...) error
- func SampleWorkflowWithMutex(ctx workflow.Context, req *v1.SampleWorkflowWithMutexInput, ...) error
- type AcquireLockSignalHandle
- type AcquireLockSignalOptions
- type ExampleOptions
- type LockAcquiredSignalHandle
- type LockAcquiredSignalOptions
- type MutexRun
- type MutexWorkflowOptions
- func (opts *MutexWorkflowOptions) WithActivityOptions(ao workflow.ActivityOptions) *MutexWorkflowOptions
- func (opts *MutexWorkflowOptions) WithDetached(d bool) *MutexWorkflowOptions
- func (opts *MutexWorkflowOptions) WithHeartbeatInterval(d time.Duration) *MutexWorkflowOptions
- func (opts *MutexWorkflowOptions) WithStartWorkflow(swo client.StartWorkflowOptions) *MutexWorkflowOptions
- type ReleaseLockSignalHandle
- type ReleaseLockSignalOptions
- type SampleWorkflowWithMutexRun
- type SampleWorkflowWithMutexWorkflowOptions
- func (opts *SampleWorkflowWithMutexWorkflowOptions) WithActivityOptions(ao workflow.ActivityOptions) *SampleWorkflowWithMutexWorkflowOptions
- func (opts *SampleWorkflowWithMutexWorkflowOptions) WithDetached(d bool) *SampleWorkflowWithMutexWorkflowOptions
- func (opts *SampleWorkflowWithMutexWorkflowOptions) WithHeartbeatInterval(d time.Duration) *SampleWorkflowWithMutexWorkflowOptions
- func (opts *SampleWorkflowWithMutexWorkflowOptions) WithStartWorkflow(swo client.StartWorkflowOptions) *SampleWorkflowWithMutexWorkflowOptions
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AcquireLock ¶
func AcquireLock(ctx workflow.Context, workflowID string, runID string, req *v1.AcquireLockInput, opts ...*AcquireLockSignalOptions) error
AcquireLock executes a(n) example.mutex.v1.Example.AcquireLock signal
func CancelExampleWorkflow ¶
CancelExampleWorkflow cancels an existing workflow
func CancelExampleWorkflowAsync ¶
func CancelExampleWorkflowAsync(ctx workflow.Context, workflowID string, runID string) workflow.Future
CancelExampleWorkflowAsync cancels an existing workflow
func LockAcquired ¶
func LockAcquired(ctx workflow.Context, workflowID string, runID string, req *v1.LockAcquiredInput, opts ...*LockAcquiredSignalOptions) error
LockAcquired executes a(n) example.mutex.v1.Example.LockAcquired signal
func Mutex ¶
func Mutex(ctx workflow.Context, req *v1.MutexInput, opts ...*MutexWorkflowOptions) error
Mutex executes a(n) example.mutex.v1.Example.Mutex workflow and blocks until error or response received
func MutexWithAcquireLock ¶
func MutexWithAcquireLock(ctx workflow.Context, req *v1.MutexInput, signal *v1.AcquireLockInput, opts ...*MutexWorkflowOptions) error
MutexWithAcquireLock sends a(n) example.mutex.v1.Example.AcquireLock signal to a example.mutex.v1.Example.Mutex workflow, starting it if necessary, and blocks until the workflow completes
func RegisterExampleActivities ¶
func RegisterExampleActivities(r worker.ActivityRegistry, c v1.ExampleClient, options ...*ExampleOptions)
RegisterExampleActivities registers example.mutex.v1.Example cross-namespace activities
func ReleaseLock ¶
func ReleaseLock(ctx workflow.Context, workflowID string, runID string, req *v1.ReleaseLockInput, opts ...*ReleaseLockSignalOptions) error
ReleaseLock executes a(n) example.mutex.v1.Example.ReleaseLock signal
func SampleWorkflowWithMutex ¶
func SampleWorkflowWithMutex(ctx workflow.Context, req *v1.SampleWorkflowWithMutexInput, opts ...*SampleWorkflowWithMutexWorkflowOptions) error
SampleWorkflowWithMutex executes a(n) example.mutex.v1.Example.SampleWorkflowWithMutex workflow and blocks until error or response received
Types ¶
type AcquireLockSignalHandle ¶
type AcquireLockSignalHandle interface { // Cancel cancels the workflow Cancel(workflow.Context) error // Future returns the inner workflow.Future Future() workflow.Future // Get returns the inner workflow.Future Get(workflow.Context) error }
AcquireLockSignalHandle provides a handle for a example.mutex.v1.Example.AcquireLock signal activity
func AcquireLockAsync ¶
func AcquireLockAsync(ctx workflow.Context, workflowID string, runID string, req *v1.AcquireLockInput, opts ...*AcquireLockSignalOptions) (AcquireLockSignalHandle, error)
AcquireLockAsync executes a(n) example.mutex.v1.Example.AcquireLock signal
type AcquireLockSignalOptions ¶
type AcquireLockSignalOptions struct { ActivityOptions *workflow.ActivityOptions HeartbeatInterval time.Duration }
AcquireLockSignalOptions are used to configure a(n) example.mutex.v1.Example.AcquireLock signal execution
func NewAcquireLockSignalOptions ¶
func NewAcquireLockSignalOptions() *AcquireLockSignalOptions
NewAcquireLockSignalOptions initializes a new AcquireLockSignalOptions value
func (*AcquireLockSignalOptions) WithActivityOptions ¶
func (opts *AcquireLockSignalOptions) WithActivityOptions(ao workflow.ActivityOptions) *AcquireLockSignalOptions
WithActivityOptions can be used to customize the activity options
func (*AcquireLockSignalOptions) WithHeartbeatInterval ¶
func (opts *AcquireLockSignalOptions) WithHeartbeatInterval(d time.Duration) *AcquireLockSignalOptions
WithHeartbeatInterval can be used to customize the activity heartbeat interval
type ExampleOptions ¶
type ExampleOptions struct {
// contains filtered or unexported fields
}
ExampleOptions is used to configure example.mutex.v1.Example xns activity registration
func NewExampleOptions ¶ added in v1.10.4
func NewExampleOptions() *ExampleOptions
NewExampleOptions initializes a new ExampleOptions value
func (*ExampleOptions) WithErrorConverter ¶ added in v1.10.4
func (opts *ExampleOptions) WithErrorConverter(errorConverter func(error) error) *ExampleOptions
WithErrorConverter overrides the default error converter applied to xns activity errors
func (*ExampleOptions) WithFilter ¶ added in v1.10.4
func (opts *ExampleOptions) WithFilter(filter func(string) string) *ExampleOptions
Filter is used to filter registered xns activities or customize their name
type LockAcquiredSignalHandle ¶
type LockAcquiredSignalHandle interface { // Cancel cancels the workflow Cancel(workflow.Context) error // Future returns the inner workflow.Future Future() workflow.Future // Get returns the inner workflow.Future Get(workflow.Context) error }
LockAcquiredSignalHandle provides a handle for a example.mutex.v1.Example.LockAcquired signal activity
func LockAcquiredAsync ¶
func LockAcquiredAsync(ctx workflow.Context, workflowID string, runID string, req *v1.LockAcquiredInput, opts ...*LockAcquiredSignalOptions) (LockAcquiredSignalHandle, error)
LockAcquiredAsync executes a(n) example.mutex.v1.Example.LockAcquired signal
type LockAcquiredSignalOptions ¶
type LockAcquiredSignalOptions struct { ActivityOptions *workflow.ActivityOptions HeartbeatInterval time.Duration }
LockAcquiredSignalOptions are used to configure a(n) example.mutex.v1.Example.LockAcquired signal execution
func NewLockAcquiredSignalOptions ¶
func NewLockAcquiredSignalOptions() *LockAcquiredSignalOptions
NewLockAcquiredSignalOptions initializes a new LockAcquiredSignalOptions value
func (*LockAcquiredSignalOptions) WithActivityOptions ¶
func (opts *LockAcquiredSignalOptions) WithActivityOptions(ao workflow.ActivityOptions) *LockAcquiredSignalOptions
WithActivityOptions can be used to customize the activity options
func (*LockAcquiredSignalOptions) WithHeartbeatInterval ¶
func (opts *LockAcquiredSignalOptions) WithHeartbeatInterval(d time.Duration) *LockAcquiredSignalOptions
WithHeartbeatInterval can be used to customize the activity heartbeat interval
type MutexRun ¶
type MutexRun interface { // Cancel cancels the workflow Cancel(workflow.Context) error // Future returns the inner workflow.Future Future() workflow.Future // Get returns the inner workflow.Future Get(workflow.Context) error // ID returns the workflow id ID() string // AcquireLock executes a(n) example.mutex.v1.Example.AcquireLock signal and blocks until completion AcquireLock(workflow.Context, *v1.AcquireLockInput, ...*AcquireLockSignalOptions) error // AcquireLockAsync executes a(n) example.mutex.v1.Example.AcquireLock signal and returns a handle to the underlying activity AcquireLockAsync(workflow.Context, *v1.AcquireLockInput, ...*AcquireLockSignalOptions) (AcquireLockSignalHandle, error) // ReleaseLock executes a(n) example.mutex.v1.Example.ReleaseLock signal and blocks until completion ReleaseLock(workflow.Context, *v1.ReleaseLockInput, ...*ReleaseLockSignalOptions) error // ReleaseLockAsync executes a(n) example.mutex.v1.Example.ReleaseLock signal and returns a handle to the underlying activity ReleaseLockAsync(workflow.Context, *v1.ReleaseLockInput, ...*ReleaseLockSignalOptions) (ReleaseLockSignalHandle, error) }
MutexRun provides a handle to a example.mutex.v1.Example.Mutex workflow execution
func MutexAsync ¶
func MutexAsync(ctx workflow.Context, req *v1.MutexInput, opts ...*MutexWorkflowOptions) (MutexRun, error)
MutexAsync executes a(n) example.mutex.v1.Example.Mutex workflow and blocks until error or response received
func MutexWithAcquireLockAsync ¶
func MutexWithAcquireLockAsync(ctx workflow.Context, req *v1.MutexInput, signal *v1.AcquireLockInput, opts ...*MutexWorkflowOptions) (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, and returns a handle to the underlying activity
type MutexWorkflowOptions ¶
type MutexWorkflowOptions struct { ActivityOptions *workflow.ActivityOptions Detached bool HeartbeatInterval time.Duration StartWorkflowOptions *client.StartWorkflowOptions }
MutexWorkflowOptions are used to configure a(n) example.mutex.v1.Example.Mutex workflow execution
func NewMutexWorkflowOptions ¶
func NewMutexWorkflowOptions() *MutexWorkflowOptions
NewMutexWorkflowOptions initializes a new MutexWorkflowOptions value
func (*MutexWorkflowOptions) WithActivityOptions ¶
func (opts *MutexWorkflowOptions) WithActivityOptions(ao workflow.ActivityOptions) *MutexWorkflowOptions
WithActivityOptions can be used to customize the activity options
func (*MutexWorkflowOptions) WithDetached ¶
func (opts *MutexWorkflowOptions) WithDetached(d bool) *MutexWorkflowOptions
WithDetached can be used to start a workflow execution and exit immediately
func (*MutexWorkflowOptions) WithHeartbeatInterval ¶
func (opts *MutexWorkflowOptions) WithHeartbeatInterval(d time.Duration) *MutexWorkflowOptions
WithHeartbeatInterval can be used to customize the activity heartbeat interval
func (*MutexWorkflowOptions) WithStartWorkflow ¶
func (opts *MutexWorkflowOptions) WithStartWorkflow(swo client.StartWorkflowOptions) *MutexWorkflowOptions
WithStartWorkflowOptions can be used to customize the start workflow options
type ReleaseLockSignalHandle ¶
type ReleaseLockSignalHandle interface { // Cancel cancels the workflow Cancel(workflow.Context) error // Future returns the inner workflow.Future Future() workflow.Future // Get returns the inner workflow.Future Get(workflow.Context) error }
ReleaseLockSignalHandle provides a handle for a example.mutex.v1.Example.ReleaseLock signal activity
func ReleaseLockAsync ¶
func ReleaseLockAsync(ctx workflow.Context, workflowID string, runID string, req *v1.ReleaseLockInput, opts ...*ReleaseLockSignalOptions) (ReleaseLockSignalHandle, error)
ReleaseLockAsync executes a(n) example.mutex.v1.Example.ReleaseLock signal
type ReleaseLockSignalOptions ¶
type ReleaseLockSignalOptions struct { ActivityOptions *workflow.ActivityOptions HeartbeatInterval time.Duration }
ReleaseLockSignalOptions are used to configure a(n) example.mutex.v1.Example.ReleaseLock signal execution
func NewReleaseLockSignalOptions ¶
func NewReleaseLockSignalOptions() *ReleaseLockSignalOptions
NewReleaseLockSignalOptions initializes a new ReleaseLockSignalOptions value
func (*ReleaseLockSignalOptions) WithActivityOptions ¶
func (opts *ReleaseLockSignalOptions) WithActivityOptions(ao workflow.ActivityOptions) *ReleaseLockSignalOptions
WithActivityOptions can be used to customize the activity options
func (*ReleaseLockSignalOptions) WithHeartbeatInterval ¶
func (opts *ReleaseLockSignalOptions) WithHeartbeatInterval(d time.Duration) *ReleaseLockSignalOptions
WithHeartbeatInterval can be used to customize the activity heartbeat interval
type SampleWorkflowWithMutexRun ¶
type SampleWorkflowWithMutexRun interface { // Cancel cancels the workflow Cancel(workflow.Context) error // Future returns the inner workflow.Future Future() workflow.Future // Get returns the inner workflow.Future Get(workflow.Context) error // ID returns the workflow id ID() string // LockAcquired executes a(n) example.mutex.v1.Example.LockAcquired signal and blocks until completion LockAcquired(workflow.Context, *v1.LockAcquiredInput, ...*LockAcquiredSignalOptions) error // LockAcquiredAsync executes a(n) example.mutex.v1.Example.LockAcquired signal and returns a handle to the underlying activity LockAcquiredAsync(workflow.Context, *v1.LockAcquiredInput, ...*LockAcquiredSignalOptions) (LockAcquiredSignalHandle, error) }
SampleWorkflowWithMutexRun provides a handle to a example.mutex.v1.Example.SampleWorkflowWithMutex workflow execution
func SampleWorkflowWithMutexAsync ¶
func SampleWorkflowWithMutexAsync(ctx workflow.Context, req *v1.SampleWorkflowWithMutexInput, opts ...*SampleWorkflowWithMutexWorkflowOptions) (SampleWorkflowWithMutexRun, error)
SampleWorkflowWithMutexAsync executes a(n) example.mutex.v1.Example.SampleWorkflowWithMutex workflow and blocks until error or response received
type SampleWorkflowWithMutexWorkflowOptions ¶
type SampleWorkflowWithMutexWorkflowOptions struct { ActivityOptions *workflow.ActivityOptions Detached bool HeartbeatInterval time.Duration StartWorkflowOptions *client.StartWorkflowOptions }
SampleWorkflowWithMutexWorkflowOptions are used to configure a(n) example.mutex.v1.Example.SampleWorkflowWithMutex workflow execution
func NewSampleWorkflowWithMutexWorkflowOptions ¶
func NewSampleWorkflowWithMutexWorkflowOptions() *SampleWorkflowWithMutexWorkflowOptions
NewSampleWorkflowWithMutexWorkflowOptions initializes a new SampleWorkflowWithMutexWorkflowOptions value
func (*SampleWorkflowWithMutexWorkflowOptions) WithActivityOptions ¶
func (opts *SampleWorkflowWithMutexWorkflowOptions) WithActivityOptions(ao workflow.ActivityOptions) *SampleWorkflowWithMutexWorkflowOptions
WithActivityOptions can be used to customize the activity options
func (*SampleWorkflowWithMutexWorkflowOptions) WithDetached ¶
func (opts *SampleWorkflowWithMutexWorkflowOptions) WithDetached(d bool) *SampleWorkflowWithMutexWorkflowOptions
WithDetached can be used to start a workflow execution and exit immediately
func (*SampleWorkflowWithMutexWorkflowOptions) WithHeartbeatInterval ¶
func (opts *SampleWorkflowWithMutexWorkflowOptions) WithHeartbeatInterval(d time.Duration) *SampleWorkflowWithMutexWorkflowOptions
WithHeartbeatInterval can be used to customize the activity heartbeat interval
func (*SampleWorkflowWithMutexWorkflowOptions) WithStartWorkflow ¶
func (opts *SampleWorkflowWithMutexWorkflowOptions) WithStartWorkflow(swo client.StartWorkflowOptions) *SampleWorkflowWithMutexWorkflowOptions
WithStartWorkflowOptions can be used to customize the start workflow options