helloworldv1xns

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/helloworld/v1/example.proto

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CancelExampleWorkflow added in v1.12.0

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

CancelExampleWorkflow cancels an existing workflow

func CancelExampleWorkflowAsync added in v1.12.0

func CancelExampleWorkflowAsync(ctx workflow.Context, workflowID string, runID string) workflow.Future

CancelExampleWorkflowAsync cancels an existing workflow

func Goodbye added in v1.12.0

func Goodbye(ctx workflow.Context, workflowID string, runID string, req *v1.GoodbyeRequest, opts ...*GoodbyeSignalOptions) error

Goodbye signals a running workflow to exit

func Hello added in v1.12.0

Hello prints a friendly greeting and waits for goodbye

func RegisterExampleActivities added in v1.12.0

func RegisterExampleActivities(r worker.ActivityRegistry, c v1.ExampleClient, options ...*ExampleOptions)

RegisterExampleActivities registers example.helloworld.v1.Example cross-namespace activities

Types

type ExampleOptions added in v1.12.0

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

ExampleOptions is used to configure example.helloworld.v1.Example xns activity registration

func NewExampleOptions added in v1.12.0

func NewExampleOptions() *ExampleOptions

NewExampleOptions initializes a new ExampleOptions value

func (*ExampleOptions) WithErrorConverter added in v1.12.0

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.12.0

func (opts *ExampleOptions) WithFilter(filter func(string) string) *ExampleOptions

Filter is used to filter registered xns activities or customize their name

type GoodbyeSignalHandle added in v1.12.0

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

GoodbyeSignalHandle provides a handle for a example.helloworld.v1.Example.Goodbye signal activity

func GoodbyeAsync added in v1.12.0

func GoodbyeAsync(ctx workflow.Context, workflowID string, runID string, req *v1.GoodbyeRequest, opts ...*GoodbyeSignalOptions) (GoodbyeSignalHandle, error)

GoodbyeAsync executes a(n) example.helloworld.v1.Example.Goodbye signal

type GoodbyeSignalOptions added in v1.12.0

type GoodbyeSignalOptions struct {
	ActivityOptions   *workflow.ActivityOptions
	HeartbeatInterval time.Duration
}

GoodbyeSignalOptions are used to configure a(n) example.helloworld.v1.Example.Goodbye signal execution

func NewGoodbyeSignalOptions added in v1.12.0

func NewGoodbyeSignalOptions() *GoodbyeSignalOptions

NewGoodbyeSignalOptions initializes a new GoodbyeSignalOptions value

func (*GoodbyeSignalOptions) WithActivityOptions added in v1.12.0

func (opts *GoodbyeSignalOptions) WithActivityOptions(ao workflow.ActivityOptions) *GoodbyeSignalOptions

WithActivityOptions can be used to customize the activity options

func (*GoodbyeSignalOptions) WithHeartbeatInterval added in v1.12.0

func (opts *GoodbyeSignalOptions) WithHeartbeatInterval(d time.Duration) *GoodbyeSignalOptions

WithHeartbeatInterval can be used to customize the activity heartbeat interval

type HelloRun added in v1.12.0

type HelloRun 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) (*v1.HelloResponse, error)

	// ID returns the workflow id
	ID() string

	// Goodbye signals a running workflow to exit
	Goodbye(workflow.Context, *v1.GoodbyeRequest, ...*GoodbyeSignalOptions) error

	// Goodbye signals a running workflow to exit
	GoodbyeAsync(workflow.Context, *v1.GoodbyeRequest, ...*GoodbyeSignalOptions) (GoodbyeSignalHandle, error)
}

HelloRun provides a handle to a example.v1.Hello workflow execution

func HelloAsync added in v1.12.0

func HelloAsync(ctx workflow.Context, req *v1.HelloRequest, opts ...*HelloWorkflowOptions) (HelloRun, error)

Hello prints a friendly greeting and waits for goodbye

type HelloWorkflowOptions added in v1.12.0

type HelloWorkflowOptions struct {
	ActivityOptions      *workflow.ActivityOptions
	Detached             bool
	HeartbeatInterval    time.Duration
	StartWorkflowOptions *client.StartWorkflowOptions
}

HelloWorkflowOptions are used to configure a(n) example.v1.Hello workflow execution

func NewHelloWorkflowOptions added in v1.12.0

func NewHelloWorkflowOptions() *HelloWorkflowOptions

NewHelloWorkflowOptions initializes a new HelloWorkflowOptions value

func (*HelloWorkflowOptions) WithActivityOptions added in v1.12.0

func (opts *HelloWorkflowOptions) WithActivityOptions(ao workflow.ActivityOptions) *HelloWorkflowOptions

WithActivityOptions can be used to customize the activity options

func (*HelloWorkflowOptions) WithDetached added in v1.12.0

func (opts *HelloWorkflowOptions) WithDetached(d bool) *HelloWorkflowOptions

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

func (*HelloWorkflowOptions) WithHeartbeatInterval added in v1.12.0

func (opts *HelloWorkflowOptions) WithHeartbeatInterval(d time.Duration) *HelloWorkflowOptions

WithHeartbeatInterval can be used to customize the activity heartbeat interval

func (*HelloWorkflowOptions) WithStartWorkflow added in v1.12.0

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