mutexv1xns

package
v1.13.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 3, 2024 License: MIT Imports: 16 Imported by: 0

Documentation

Overview

Code generated by protoc-gen-go_temporal. DO NOT EDIT. versions:

protoc-gen-go_temporal 1.12.1-next (ec80fd34c1a9a69042c74c5d3da0091b91ac2e0c)
go go1.22.1
protoc (unknown)

source: example/mutex/v1/mutex.proto

Index

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

func CancelExampleWorkflow(ctx workflow.Context, workflowID string, runID string) error

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

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

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

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

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

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

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

WithActivityOptions can be used to customize the activity options

func (*SampleWorkflowWithMutexWorkflowOptions) WithDetached

WithDetached can be used to start a workflow execution and exit immediately

func (*SampleWorkflowWithMutexWorkflowOptions) WithHeartbeatInterval

WithHeartbeatInterval can be used to customize the activity heartbeat interval

func (*SampleWorkflowWithMutexWorkflowOptions) WithStartWorkflow

WithStartWorkflowOptions can be used to customize the start workflow options

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL