xnserrv1

package
v1.12.0 Latest Latest
Warning

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

Go to latest
Published: Apr 19, 2024 License: MIT Imports: 25 Imported by: 0

Documentation

Overview

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

protoc-gen-go_temporal 1.11.1-next (c39ba7f5af358428c18ecce12978be63d88f77f4)
go go1.22.1
protoc (unknown)

source: test/xnserr/v1/xnserr.proto

Index

Constants

View Source
const (
	CallSleepWorkflowName = "test.xnserr.v1.Client.CallSleep"
)

test.xnserr.v1.Client workflow names

View Source
const ClientTaskQueue = "xnserr-client-v1"

ClientTaskQueue is the default task-queue for a test.xnserr.v1.Client worker

View Source
const ServerTaskQueue = "xnserr-server-v1"

ServerTaskQueue is the default task-queue for a test.xnserr.v1.Server worker

View Source
const (
	SleepWorkflowName = "test.xnserr.v1.Server.Sleep"
)

test.xnserr.v1.Server workflow names

Variables

View Source
var (
	FailureInfo_name = map[int32]string{
		0: "FAILURE_INFO_UNSPECIFIED",
		1: "FAILURE_INFO_APPLICATION_ERROR",
		2: "FAILURE_INFO_TIMEOUT",
		3: "FAILURE_INFO_CANCELED",
		4: "FAILURE_INFO_TERMINATED",
		5: "FAILURE_INFO_ACTIVITY",
		6: "FAILURE_INFO_WORKFLOW_EXECUTION",
		7: "FAILURE_INFO_CHILD_WORKFLOW_EXECUTION",
	}
	FailureInfo_value = map[string]int32{
		"FAILURE_INFO_UNSPECIFIED":              0,
		"FAILURE_INFO_APPLICATION_ERROR":        1,
		"FAILURE_INFO_TIMEOUT":                  2,
		"FAILURE_INFO_CANCELED":                 3,
		"FAILURE_INFO_TERMINATED":               4,
		"FAILURE_INFO_ACTIVITY":                 5,
		"FAILURE_INFO_WORKFLOW_EXECUTION":       6,
		"FAILURE_INFO_CHILD_WORKFLOW_EXECUTION": 7,
	}
)

Enum value maps for FailureInfo.

View Source
var (
	// CallSleepFunction implements a "test.xnserr.v1.Client.CallSleep" workflow
	CallSleepFunction func(workflow.Context, *CallSleepRequest) error
)

Reference to generated workflow functions

View Source
var File_test_xnserr_v1_xnserr_proto protoreflect.FileDescriptor
View Source
var (
	// SleepFunction implements a "test.xnserr.v1.Server.Sleep" workflow
	SleepFunction func(workflow.Context, *SleepRequest) error
)

Reference to generated workflow functions

Functions

func CallSleepChild

func CallSleepChild(ctx workflow.Context, req *CallSleepRequest, options ...*CallSleepChildOptions) error

CallSleepChild executes a child test.xnserr.v1.Client.CallSleep workflow and blocks until error or response received

func NewClientCli

func NewClientCli(options ...*ClientCliOptions) (*v2.App, error)

NewClientCli initializes a cli for a(n) test.xnserr.v1.Client service

func NewClientCliCommand

func NewClientCliCommand(options ...*ClientCliOptions) (*v2.Command, error)

NewClientCliCommand initializes a cli command for a test.xnserr.v1.Client service with subcommands for each query, signal, update, and workflow

func NewClientClientOptions

func NewClientClientOptions() *clientClientOptions

NewClientClientOptions initializes a new clientClientOptions value

func NewServerCli

func NewServerCli(options ...*ServerCliOptions) (*v2.App, error)

NewServerCli initializes a cli for a(n) test.xnserr.v1.Server service

func NewServerCliCommand

func NewServerCliCommand(options ...*ServerCliOptions) (*v2.Command, error)

NewServerCliCommand initializes a cli command for a test.xnserr.v1.Server service with subcommands for each query, signal, update, and workflow

func NewServerClientOptions

func NewServerClientOptions() *serverClientOptions

NewServerClientOptions initializes a new serverClientOptions value

func RegisterCallSleepWorkflow

func RegisterCallSleepWorkflow(r worker.WorkflowRegistry, wf func(workflow.Context, *CallSleepWorkflowInput) (CallSleepWorkflow, error))

RegisterCallSleepWorkflow registers a test.xnserr.v1.Client.CallSleep workflow with the given worker

func RegisterClientActivities

func RegisterClientActivities(r worker.ActivityRegistry, activities ClientActivities)

RegisterClientActivities registers activities with a worker

func RegisterClientWorkflows

func RegisterClientWorkflows(r worker.WorkflowRegistry, workflows ClientWorkflows)

RegisterClientWorkflows registers test.xnserr.v1.Client workflows with the given worker

func RegisterServerActivities

func RegisterServerActivities(r worker.ActivityRegistry, activities ServerActivities)

RegisterServerActivities registers activities with a worker

func RegisterServerWorkflows

func RegisterServerWorkflows(r worker.WorkflowRegistry, workflows ServerWorkflows)

RegisterServerWorkflows registers test.xnserr.v1.Server workflows with the given worker

func RegisterSleepWorkflow

func RegisterSleepWorkflow(r worker.WorkflowRegistry, wf func(workflow.Context, *SleepWorkflowInput) (SleepWorkflow, error))

RegisterSleepWorkflow registers a test.xnserr.v1.Server.Sleep workflow with the given worker

func SleepChild

func SleepChild(ctx workflow.Context, req *SleepRequest, options ...*SleepChildOptions) error

SleepChild executes a child test.xnserr.v1.Server.Sleep workflow and blocks until error or response received

func WithClientSchemeTypes

func WithClientSchemeTypes() scheme.Option

WithClientSchemeTypes registers all Client protobuf types with the given scheme

func WithServerSchemeTypes

func WithServerSchemeTypes() scheme.Option

WithServerSchemeTypes registers all Server protobuf types with the given scheme

Types

type CallSleepChildOptions

type CallSleepChildOptions struct {
	// contains filtered or unexported fields
}

CallSleepChildOptions provides configuration for a test.xnserr.v1.Client.CallSleep workflow operation

func NewCallSleepChildOptions

func NewCallSleepChildOptions() *CallSleepChildOptions

NewCallSleepChildOptions initializes a new CallSleepChildOptions value

func (*CallSleepChildOptions) WithChildWorkflowOptions

func (opts *CallSleepChildOptions) WithChildWorkflowOptions(options workflow.ChildWorkflowOptions) *CallSleepChildOptions

WithChildWorkflowOptions sets the initial client.StartWorkflowOptions

type CallSleepChildRun

type CallSleepChildRun struct {
	Future workflow.ChildWorkflowFuture
}

CallSleepChildRun describes a child CallSleep workflow run

func CallSleepChildAsync

func CallSleepChildAsync(ctx workflow.Context, req *CallSleepRequest, options ...*CallSleepChildOptions) (*CallSleepChildRun, error)

CallSleepChildAsync starts a child test.xnserr.v1.Client.CallSleep workflow and returns a handle to the child workflow run

func (*CallSleepChildRun) Get

Get blocks until the workflow is completed, returning the response value

func (*CallSleepChildRun) Select

Select adds this completion to the selector. Callback can be nil.

func (*CallSleepChildRun) SelectStart

func (r *CallSleepChildRun) SelectStart(sel workflow.Selector, fn func(*CallSleepChildRun)) workflow.Selector

SelectStart adds waiting for start to the selector. Callback can be nil.

func (*CallSleepChildRun) WaitStart

func (r *CallSleepChildRun) WaitStart(ctx workflow.Context) (*workflow.Execution, error)

WaitStart waits for the child workflow to start

type CallSleepOptions

type CallSleepOptions struct {
	// contains filtered or unexported fields
}

CallSleepOptions provides configuration for a test.xnserr.v1.Client.CallSleep workflow operation

func NewCallSleepOptions

func NewCallSleepOptions() *CallSleepOptions

NewCallSleepOptions initializes a new CallSleepOptions value

func (*CallSleepOptions) WithStartWorkflowOptions

func (opts *CallSleepOptions) WithStartWorkflowOptions(options client.StartWorkflowOptions) *CallSleepOptions

WithStartWorkflowOptions sets the initial client.StartWorkflowOptions

type CallSleepRequest

type CallSleepRequest struct {
	Sleep                *durationpb.Duration     `protobuf:"bytes,1,opt,name=sleep,proto3" json:"sleep,omitempty"`
	Failure              *Failure                 `protobuf:"bytes,2,opt,name=failure,proto3" json:"failure,omitempty"`
	StartWorkflowOptions *v1.StartWorkflowOptions `protobuf:"bytes,3,opt,name=start_workflow_options,json=startWorkflowOptions,proto3" json:"start_workflow_options,omitempty"`
	RetryPolicy          *v1.RetryPolicy          `protobuf:"bytes,4,opt,name=retry_policy,json=retryPolicy,proto3" json:"retry_policy,omitempty"`
	// contains filtered or unexported fields
}

func UnmarshalCliFlagsToCallSleepRequest

func UnmarshalCliFlagsToCallSleepRequest(cmd *v2.Context) (*CallSleepRequest, error)

UnmarshalCliFlagsToCallSleepRequest unmarshals a CallSleepRequest from command line flags

func (*CallSleepRequest) Descriptor deprecated

func (*CallSleepRequest) Descriptor() ([]byte, []int)

Deprecated: Use CallSleepRequest.ProtoReflect.Descriptor instead.

func (*CallSleepRequest) GetFailure

func (x *CallSleepRequest) GetFailure() *Failure

func (*CallSleepRequest) GetRetryPolicy

func (x *CallSleepRequest) GetRetryPolicy() *v1.RetryPolicy

func (*CallSleepRequest) GetSleep

func (x *CallSleepRequest) GetSleep() *durationpb.Duration

func (*CallSleepRequest) GetStartWorkflowOptions

func (x *CallSleepRequest) GetStartWorkflowOptions() *v1.StartWorkflowOptions

func (*CallSleepRequest) ProtoMessage

func (*CallSleepRequest) ProtoMessage()

func (*CallSleepRequest) ProtoReflect

func (x *CallSleepRequest) ProtoReflect() protoreflect.Message

func (*CallSleepRequest) Reset

func (x *CallSleepRequest) Reset()

func (*CallSleepRequest) String

func (x *CallSleepRequest) String() string

type CallSleepRun

type CallSleepRun 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
}

CallSleepRun describes a(n) test.xnserr.v1.Client.CallSleep workflow run

type CallSleepWorkflow

type CallSleepWorkflow interface {
	// Execute defines the entrypoint to a(n) test.xnserr.v1.Client.CallSleep workflow
	Execute(ctx workflow.Context) error
}

CallSleepWorkflow describes a(n) test.xnserr.v1.Client.CallSleep workflow implementation

type CallSleepWorkflowInput

type CallSleepWorkflowInput struct {
	Req *CallSleepRequest
}

CallSleepWorkflowInput describes the input to a(n) test.xnserr.v1.Client.CallSleep workflow constructor

type ClientActivities

type ClientActivities interface{}

ClientActivities describes available worker activities

type ClientCliOptions

type ClientCliOptions struct {
	// contains filtered or unexported fields
}

ClientCliOptions describes runtime configuration for test.xnserr.v1.Client cli

func NewClientCliOptions

func NewClientCliOptions() *ClientCliOptions

NewClientCliOptions initializes a new ClientCliOptions value

func (*ClientCliOptions) WithAfter

func (opts *ClientCliOptions) WithAfter(fn func(*v2.Context) error) *ClientCliOptions

WithAfter injects a custom After hook to be run after any command invocation

func (*ClientCliOptions) WithBefore

func (opts *ClientCliOptions) WithBefore(fn func(*v2.Context) error) *ClientCliOptions

WithBefore injects a custom Before hook to be run prior to any command invocation

func (*ClientCliOptions) WithClient

func (opts *ClientCliOptions) WithClient(fn func(*v2.Context) (client.Client, error)) *ClientCliOptions

WithClient provides a Temporal client factory for use by commands

func (*ClientCliOptions) WithWorker

func (opts *ClientCliOptions) WithWorker(fn func(*v2.Context, client.Client) (worker.Worker, error)) *ClientCliOptions

WithWorker provides an method for initializing a worker

type ClientClient

type ClientClient interface {
	// CallSleep executes a(n) test.xnserr.v1.Client.CallSleep workflow and blocks until error or response received
	CallSleep(ctx context.Context, req *CallSleepRequest, opts ...*CallSleepOptions) error

	// CallSleepAsync starts a(n) test.xnserr.v1.Client.CallSleep workflow and returns a handle to the workflow run
	CallSleepAsync(ctx context.Context, req *CallSleepRequest, opts ...*CallSleepOptions) (CallSleepRun, error)

	// GetCallSleep retrieves a handle to an existing test.xnserr.v1.Client.CallSleep workflow execution
	GetCallSleep(ctx context.Context, workflowID string, runID string) CallSleepRun

	// 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
}

ClientClient describes a client for a(n) test.xnserr.v1.Client worker

func NewClientClient

func NewClientClient(c client.Client, options ...*clientClientOptions) ClientClient

NewClientClient initializes a new test.xnserr.v1.Client client

func NewClientClientWithOptions

func NewClientClientWithOptions(c client.Client, opts client.Options, options ...*clientClientOptions) (ClientClient, error)

NewClientClientWithOptions initializes a new Client client with the given options

type ClientWorkflowFunctions added in v1.12.0

type ClientWorkflowFunctions interface {
	// CallSleep executes a "test.xnserr.v1.Client.CallSleep" workflow inline
	CallSleep(workflow.Context, *CallSleepRequest) error
}

ClientWorkflowFunctions describes a mockable dependency for inlining workflows within other workflows

func NewClientWorkflowFunctions added in v1.12.0

func NewClientWorkflowFunctions() ClientWorkflowFunctions

type ClientWorkflows

type ClientWorkflows interface {
	// CallSleep initializes a new a(n) CallSleepWorkflow implementation
	CallSleep(ctx workflow.Context, input *CallSleepWorkflowInput) (CallSleepWorkflow, error)
}

ClientWorkflows provides methods for initializing new test.xnserr.v1.Client workflow values

type Failure

type Failure struct {
	Message              string      `protobuf:"bytes,1,opt,name=message,proto3" json:"message,omitempty"`
	NonRetryable         bool        `protobuf:"varint,2,opt,name=non_retryable,json=nonRetryable,proto3" json:"non_retryable,omitempty"`
	Info                 FailureInfo `protobuf:"varint,3,opt,name=info,proto3,enum=test.xnserr.v1.FailureInfo" json:"info,omitempty"`
	ApplicationErrorType string      `protobuf:"bytes,4,opt,name=application_error_type,json=applicationErrorType,proto3" json:"application_error_type,omitempty"`
	// contains filtered or unexported fields
}

func (*Failure) Descriptor deprecated

func (*Failure) Descriptor() ([]byte, []int)

Deprecated: Use Failure.ProtoReflect.Descriptor instead.

func (*Failure) GetApplicationErrorType

func (x *Failure) GetApplicationErrorType() string

func (*Failure) GetInfo

func (x *Failure) GetInfo() FailureInfo

func (*Failure) GetMessage

func (x *Failure) GetMessage() string

func (*Failure) GetNonRetryable

func (x *Failure) GetNonRetryable() bool

func (*Failure) ProtoMessage

func (*Failure) ProtoMessage()

func (*Failure) ProtoReflect

func (x *Failure) ProtoReflect() protoreflect.Message

func (*Failure) Reset

func (x *Failure) Reset()

func (*Failure) String

func (x *Failure) String() string

type FailureInfo

type FailureInfo int32
const (
	FailureInfo_FAILURE_INFO_UNSPECIFIED              FailureInfo = 0
	FailureInfo_FAILURE_INFO_APPLICATION_ERROR        FailureInfo = 1
	FailureInfo_FAILURE_INFO_TIMEOUT                  FailureInfo = 2
	FailureInfo_FAILURE_INFO_CANCELED                 FailureInfo = 3
	FailureInfo_FAILURE_INFO_TERMINATED               FailureInfo = 4
	FailureInfo_FAILURE_INFO_ACTIVITY                 FailureInfo = 5
	FailureInfo_FAILURE_INFO_WORKFLOW_EXECUTION       FailureInfo = 6
	FailureInfo_FAILURE_INFO_CHILD_WORKFLOW_EXECUTION FailureInfo = 7
)

func (FailureInfo) Descriptor

func (FailureInfo) Enum

func (x FailureInfo) Enum() *FailureInfo

func (FailureInfo) EnumDescriptor deprecated

func (FailureInfo) EnumDescriptor() ([]byte, []int)

Deprecated: Use FailureInfo.Descriptor instead.

func (FailureInfo) Number

func (x FailureInfo) Number() protoreflect.EnumNumber

func (FailureInfo) String

func (x FailureInfo) String() string

func (FailureInfo) Type

type ServerActivities

type ServerActivities interface{}

ServerActivities describes available worker activities

type ServerCliOptions

type ServerCliOptions struct {
	// contains filtered or unexported fields
}

ServerCliOptions describes runtime configuration for test.xnserr.v1.Server cli

func NewServerCliOptions

func NewServerCliOptions() *ServerCliOptions

NewServerCliOptions initializes a new ServerCliOptions value

func (*ServerCliOptions) WithAfter

func (opts *ServerCliOptions) WithAfter(fn func(*v2.Context) error) *ServerCliOptions

WithAfter injects a custom After hook to be run after any command invocation

func (*ServerCliOptions) WithBefore

func (opts *ServerCliOptions) WithBefore(fn func(*v2.Context) error) *ServerCliOptions

WithBefore injects a custom Before hook to be run prior to any command invocation

func (*ServerCliOptions) WithClient

func (opts *ServerCliOptions) WithClient(fn func(*v2.Context) (client.Client, error)) *ServerCliOptions

WithClient provides a Temporal client factory for use by commands

func (*ServerCliOptions) WithWorker

func (opts *ServerCliOptions) WithWorker(fn func(*v2.Context, client.Client) (worker.Worker, error)) *ServerCliOptions

WithWorker provides an method for initializing a worker

type ServerClient

type ServerClient interface {
	// Sleep executes a(n) test.xnserr.v1.Server.Sleep workflow and blocks until error or response received
	Sleep(ctx context.Context, req *SleepRequest, opts ...*SleepOptions) error

	// SleepAsync starts a(n) test.xnserr.v1.Server.Sleep workflow and returns a handle to the workflow run
	SleepAsync(ctx context.Context, req *SleepRequest, opts ...*SleepOptions) (SleepRun, error)

	// GetSleep retrieves a handle to an existing test.xnserr.v1.Server.Sleep workflow execution
	GetSleep(ctx context.Context, workflowID string, runID string) SleepRun

	// 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
}

ServerClient describes a client for a(n) test.xnserr.v1.Server worker

func NewServerClient

func NewServerClient(c client.Client, options ...*serverClientOptions) ServerClient

NewServerClient initializes a new test.xnserr.v1.Server client

func NewServerClientWithOptions

func NewServerClientWithOptions(c client.Client, opts client.Options, options ...*serverClientOptions) (ServerClient, error)

NewServerClientWithOptions initializes a new Server client with the given options

type ServerWorkflowFunctions added in v1.12.0

type ServerWorkflowFunctions interface {
	// Sleep executes a "test.xnserr.v1.Server.Sleep" workflow inline
	Sleep(workflow.Context, *SleepRequest) error
}

ServerWorkflowFunctions describes a mockable dependency for inlining workflows within other workflows

func NewServerWorkflowFunctions added in v1.12.0

func NewServerWorkflowFunctions() ServerWorkflowFunctions

type ServerWorkflows

type ServerWorkflows interface {
	// Sleep initializes a new a(n) SleepWorkflow implementation
	Sleep(ctx workflow.Context, input *SleepWorkflowInput) (SleepWorkflow, error)
}

ServerWorkflows provides methods for initializing new test.xnserr.v1.Server workflow values

type SleepChildOptions

type SleepChildOptions struct {
	// contains filtered or unexported fields
}

SleepChildOptions provides configuration for a test.xnserr.v1.Server.Sleep workflow operation

func NewSleepChildOptions

func NewSleepChildOptions() *SleepChildOptions

NewSleepChildOptions initializes a new SleepChildOptions value

func (*SleepChildOptions) WithChildWorkflowOptions

func (opts *SleepChildOptions) WithChildWorkflowOptions(options workflow.ChildWorkflowOptions) *SleepChildOptions

WithChildWorkflowOptions sets the initial client.StartWorkflowOptions

type SleepChildRun

type SleepChildRun struct {
	Future workflow.ChildWorkflowFuture
}

SleepChildRun describes a child Sleep workflow run

func SleepChildAsync

func SleepChildAsync(ctx workflow.Context, req *SleepRequest, options ...*SleepChildOptions) (*SleepChildRun, error)

SleepChildAsync starts a child test.xnserr.v1.Server.Sleep workflow and returns a handle to the child workflow run

func (*SleepChildRun) Get

func (r *SleepChildRun) Get(ctx workflow.Context) error

Get blocks until the workflow is completed, returning the response value

func (*SleepChildRun) Select

func (r *SleepChildRun) Select(sel workflow.Selector, fn func(*SleepChildRun)) workflow.Selector

Select adds this completion to the selector. Callback can be nil.

func (*SleepChildRun) SelectStart

func (r *SleepChildRun) SelectStart(sel workflow.Selector, fn func(*SleepChildRun)) workflow.Selector

SelectStart adds waiting for start to the selector. Callback can be nil.

func (*SleepChildRun) WaitStart

func (r *SleepChildRun) WaitStart(ctx workflow.Context) (*workflow.Execution, error)

WaitStart waits for the child workflow to start

type SleepOptions

type SleepOptions struct {
	// contains filtered or unexported fields
}

SleepOptions provides configuration for a test.xnserr.v1.Server.Sleep workflow operation

func NewSleepOptions

func NewSleepOptions() *SleepOptions

NewSleepOptions initializes a new SleepOptions value

func (*SleepOptions) WithStartWorkflowOptions

func (opts *SleepOptions) WithStartWorkflowOptions(options client.StartWorkflowOptions) *SleepOptions

WithStartWorkflowOptions sets the initial client.StartWorkflowOptions

type SleepRequest

type SleepRequest struct {
	Sleep   *durationpb.Duration `protobuf:"bytes,1,opt,name=sleep,proto3" json:"sleep,omitempty"`
	Failure *Failure             `protobuf:"bytes,2,opt,name=failure,proto3" json:"failure,omitempty"`
	// contains filtered or unexported fields
}

func UnmarshalCliFlagsToSleepRequest

func UnmarshalCliFlagsToSleepRequest(cmd *v2.Context) (*SleepRequest, error)

UnmarshalCliFlagsToSleepRequest unmarshals a SleepRequest from command line flags

func (*SleepRequest) Descriptor deprecated

func (*SleepRequest) Descriptor() ([]byte, []int)

Deprecated: Use SleepRequest.ProtoReflect.Descriptor instead.

func (*SleepRequest) GetFailure

func (x *SleepRequest) GetFailure() *Failure

func (*SleepRequest) GetSleep

func (x *SleepRequest) GetSleep() *durationpb.Duration

func (*SleepRequest) ProtoMessage

func (*SleepRequest) ProtoMessage()

func (*SleepRequest) ProtoReflect

func (x *SleepRequest) ProtoReflect() protoreflect.Message

func (*SleepRequest) Reset

func (x *SleepRequest) Reset()

func (*SleepRequest) String

func (x *SleepRequest) String() string

type SleepRun

type SleepRun 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
}

SleepRun describes a(n) test.xnserr.v1.Server.Sleep workflow run

type SleepWorkflow

type SleepWorkflow interface {
	// Execute defines the entrypoint to a(n) test.xnserr.v1.Server.Sleep workflow
	Execute(ctx workflow.Context) error
}

SleepWorkflow describes a(n) test.xnserr.v1.Server.Sleep workflow implementation

type SleepWorkflowInput

type SleepWorkflowInput struct {
	Req *SleepRequest
}

SleepWorkflowInput describes the input to a(n) test.xnserr.v1.Server.Sleep workflow constructor

type TestClientClient

type TestClientClient struct {
	// contains filtered or unexported fields
}

TestClient provides a testsuite-compatible Client

func NewTestClientClient

func NewTestClientClient(env *testsuite.TestWorkflowEnvironment, workflows ClientWorkflows, activities ClientActivities) *TestClientClient

NewTestClientClient initializes a new TestClientClient value

func (*TestClientClient) CallSleep

func (c *TestClientClient) CallSleep(ctx context.Context, req *CallSleepRequest, opts ...*CallSleepOptions) error

CallSleep executes a(n) test.xnserr.v1.Client.CallSleep workflow in the test environment

func (*TestClientClient) CallSleepAsync

func (c *TestClientClient) CallSleepAsync(ctx context.Context, req *CallSleepRequest, options ...*CallSleepOptions) (CallSleepRun, error)

CallSleepAsync executes a(n) test.xnserr.v1.Client.CallSleep workflow in the test environment

func (*TestClientClient) CancelWorkflow

func (c *TestClientClient) CancelWorkflow(ctx context.Context, workflowID string, runID string) error

CancelWorkflow requests cancellation of an existing workflow execution

func (*TestClientClient) GetCallSleep

func (c *TestClientClient) GetCallSleep(ctx context.Context, workflowID string, runID string) CallSleepRun

GetCallSleep is a noop

func (*TestClientClient) TerminateWorkflow

func (c *TestClientClient) TerminateWorkflow(ctx context.Context, workflowID string, runID string, reason string, details ...interface{}) error

TerminateWorkflow terminates an existing workflow execution

type TestServerClient

type TestServerClient struct {
	// contains filtered or unexported fields
}

TestClient provides a testsuite-compatible Client

func NewTestServerClient

func NewTestServerClient(env *testsuite.TestWorkflowEnvironment, workflows ServerWorkflows, activities ServerActivities) *TestServerClient

NewTestServerClient initializes a new TestServerClient value

func (*TestServerClient) CancelWorkflow

func (c *TestServerClient) CancelWorkflow(ctx context.Context, workflowID string, runID string) error

CancelWorkflow requests cancellation of an existing workflow execution

func (*TestServerClient) GetSleep

func (c *TestServerClient) GetSleep(ctx context.Context, workflowID string, runID string) SleepRun

GetSleep is a noop

func (*TestServerClient) Sleep

func (c *TestServerClient) Sleep(ctx context.Context, req *SleepRequest, opts ...*SleepOptions) error

Sleep executes a(n) test.xnserr.v1.Server.Sleep workflow in the test environment

func (*TestServerClient) SleepAsync

func (c *TestServerClient) SleepAsync(ctx context.Context, req *SleepRequest, options ...*SleepOptions) (SleepRun, error)

SleepAsync executes a(n) test.xnserr.v1.Server.Sleep workflow in the test environment

func (*TestServerClient) TerminateWorkflow

func (c *TestServerClient) 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.

Jump to

Keyboard shortcuts

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