helloworldv1

package
v1.10.3 Latest Latest
Warning

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

Go to latest
Published: Apr 5, 2024 License: MIT Imports: 24 Imported by: 0

Documentation

Overview

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

protoc-gen-go_temporal 1.10.3-next (0ee894c9c5eb74083457f7963d880cad1a7c1a2f)
go go1.22.1
protoc (unknown)

source: example/helloworld/v1/helloworld.proto

Index

Constants

View Source
const (
	HelloWorldActivityName = "HelloWorld"
)

example.helloworld.v1.HelloWorld activity names

View Source
const HelloWorldTaskQueue = "hello-world"

HelloWorldTaskQueue is the default task-queue for a example.helloworld.v1.HelloWorld worker

View Source
const (
	HelloWorldWorkflowName = "HelloWorld"
)

example.helloworld.v1.HelloWorld workflow names

Variables

View Source
var File_example_helloworld_v1_helloworld_proto protoreflect.FileDescriptor
View Source
var (
	// HelloWorld describes a Temporal workflow and activity with the same name
	// and signature
	HelloWorldFunction func(workflow.Context, *HelloWorldInput) (*HelloWorldOutput, error)
)

Reference to generated workflow functions

View Source
var (
	HelloWorldIdexpression = expression.MustParseExpression("hello_world/${! uuid_v4() }")
)

example.helloworld.v1.HelloWorld workflow id expressions

Functions

func NewHelloWorldCli

func NewHelloWorldCli(options ...*HelloWorldCliOptions) (*v2.App, error)

NewHelloWorldCli initializes a cli for a(n) example.helloworld.v1.HelloWorld service

func NewHelloWorldCliCommand

func NewHelloWorldCliCommand(options ...*HelloWorldCliOptions) (*v2.Command, error)

NewHelloWorldCliCommand initializes a cli command for a example.helloworld.v1.HelloWorld service with subcommands for each query, signal, update, and workflow

func NewHelloWorldClientOptions

func NewHelloWorldClientOptions() *helloWorldClientOptions

NewHelloWorldClientOptions initializes a new helloWorldClientOptions value

func RegisterHelloWorldActivities

func RegisterHelloWorldActivities(r worker.ActivityRegistry, activities HelloWorldActivities)

RegisterHelloWorldActivities registers activities with a worker

func RegisterHelloWorldActivity

func RegisterHelloWorldActivity(r worker.ActivityRegistry, fn func(context.Context, *HelloWorldInput) (*HelloWorldOutput, error))

RegisterHelloWorldActivity registers a HelloWorld activity

func RegisterHelloWorldWorkflow

func RegisterHelloWorldWorkflow(r worker.WorkflowRegistry, wf func(workflow.Context, *HelloWorldWorkflowInput) (HelloWorldWorkflow, error))

RegisterHelloWorldWorkflow registers a example.helloworld.v1.HelloWorld.HelloWorld workflow with the given worker

func RegisterHelloWorldWorkflows

func RegisterHelloWorldWorkflows(r worker.WorkflowRegistry, workflows HelloWorldWorkflows)

RegisterHelloWorldWorkflows registers example.helloworld.v1.HelloWorld workflows with the given worker

func WithHelloWorldSchemeTypes

func WithHelloWorldSchemeTypes() scheme.Option

WithHelloWorldSchemeTypes registers all HelloWorld protobuf types with the given scheme

Types

type HelloWorldActivities

type HelloWorldActivities interface {
	// HelloWorld describes a Temporal workflow and activity with the same name
	// and signature
	HelloWorld(ctx context.Context, req *HelloWorldInput) (*HelloWorldOutput, error)
}

HelloWorldActivities describes available worker activities

type HelloWorldActivityOptions

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

HelloWorldActivityOptions provides configuration for a(n) HelloWorld activity

func NewHelloWorldActivityOptions

func NewHelloWorldActivityOptions() *HelloWorldActivityOptions

NewHelloWorldActivityOptions sets default ActivityOptions

func (*HelloWorldActivityOptions) WithActivityOptions

WithActivityOptions sets default ActivityOptions

type HelloWorldChildOptions

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

HelloWorldChildOptions provides configuration for a HelloWorld workflow operation

func NewHelloWorldChildOptions

func NewHelloWorldChildOptions() *HelloWorldChildOptions

NewHelloWorldChildOptions initializes a new HelloWorldChildOptions value

func (*HelloWorldChildOptions) WithChildWorkflowOptions

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

WithChildWorkflowOptions sets the initial client.StartWorkflowOptions

type HelloWorldChildRun

type HelloWorldChildRun struct {
	Future workflow.ChildWorkflowFuture
}

HelloWorldChildRun describes a child HelloWorld workflow run

func HelloWorldChildAsync

func HelloWorldChildAsync(ctx workflow.Context, req *HelloWorldInput, options ...*HelloWorldChildOptions) (*HelloWorldChildRun, error)

HelloWorld describes a Temporal workflow and activity with the same name and signature

func (*HelloWorldChildRun) Get

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

func (*HelloWorldChildRun) Select

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

func (*HelloWorldChildRun) SelectStart

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

func (*HelloWorldChildRun) WaitStart

WaitStart waits for the child workflow to start

type HelloWorldCliOptions

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

HelloWorldCliOptions describes runtime configuration for example.helloworld.v1.HelloWorld cli

func NewHelloWorldCliOptions

func NewHelloWorldCliOptions() *HelloWorldCliOptions

NewHelloWorldCliOptions initializes a new HelloWorldCliOptions value

func (*HelloWorldCliOptions) WithAfter

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

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

func (*HelloWorldCliOptions) WithBefore

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

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

func (*HelloWorldCliOptions) WithClient

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

WithClient provides a Temporal client factory for use by commands

func (*HelloWorldCliOptions) WithWorker

WithWorker provides an method for initializing a worker

type HelloWorldClient

type HelloWorldClient interface {
	// HelloWorld describes a Temporal workflow and activity with the same name
	// and signature
	HelloWorld(ctx context.Context, req *HelloWorldInput, opts ...*HelloWorldOptions) (*HelloWorldOutput, error)

	// HelloWorldAsync starts a(n) HelloWorld workflow and returns a handle to the workflow run
	HelloWorldAsync(ctx context.Context, req *HelloWorldInput, opts ...*HelloWorldOptions) (HelloWorldRun, error)

	// GetHelloWorld retrieves a handle to an existing HelloWorld workflow execution
	GetHelloWorld(ctx context.Context, workflowID string, runID string) HelloWorldRun

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

HelloWorldClient describes a client for a(n) example.helloworld.v1.HelloWorld worker

func NewHelloWorldClient

func NewHelloWorldClient(c client.Client, options ...*helloWorldClientOptions) HelloWorldClient

NewHelloWorldClient initializes a new example.helloworld.v1.HelloWorld client

func NewHelloWorldClientWithOptions

func NewHelloWorldClientWithOptions(c client.Client, opts client.Options, options ...*helloWorldClientOptions) (HelloWorldClient, error)

NewHelloWorldClientWithOptions initializes a new HelloWorld client with the given options

type HelloWorldFuture

type HelloWorldFuture struct {
	Future workflow.Future
}

HelloWorldFuture describes a(n) HelloWorld activity execution

func HelloWorldAsync

func HelloWorldAsync(ctx workflow.Context, req *HelloWorldInput, options ...*HelloWorldActivityOptions) *HelloWorldFuture

HelloWorld describes a Temporal workflow and activity with the same name and signature

func HelloWorldLocalAsync

func HelloWorldLocalAsync(ctx workflow.Context, req *HelloWorldInput, options ...*HelloWorldLocalActivityOptions) *HelloWorldFuture

HelloWorld describes a Temporal workflow and activity with the same name and signature

func (*HelloWorldFuture) Get

Get blocks on the activity's completion, returning the response

func (*HelloWorldFuture) Select

Select adds the activity's completion to the selector, callback can be nil

type HelloWorldInput

type HelloWorldInput struct {
	Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	// contains filtered or unexported fields
}

HelloWorldInput describes the input to a HelloWorld task

func UnmarshalCliFlagsToHelloWorldInput

func UnmarshalCliFlagsToHelloWorldInput(cmd *v2.Context) (*HelloWorldInput, error)

UnmarshalCliFlagsToHelloWorldInput unmarshals a HelloWorldInput from command line flags

func (*HelloWorldInput) Descriptor deprecated

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

Deprecated: Use HelloWorldInput.ProtoReflect.Descriptor instead.

func (*HelloWorldInput) GetName

func (x *HelloWorldInput) GetName() string

func (*HelloWorldInput) ProtoMessage

func (*HelloWorldInput) ProtoMessage()

func (*HelloWorldInput) ProtoReflect

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

func (*HelloWorldInput) Reset

func (x *HelloWorldInput) Reset()

func (*HelloWorldInput) String

func (x *HelloWorldInput) String() string

type HelloWorldLocalActivityOptions

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

HelloWorldLocalActivityOptions provides configuration for a local HelloWorld activity

func NewHelloWorldLocalActivityOptions

func NewHelloWorldLocalActivityOptions() *HelloWorldLocalActivityOptions

NewHelloWorldLocalActivityOptions sets default LocalActivityOptions

func (*HelloWorldLocalActivityOptions) Local

Local provides a local HelloWorld activity implementation

func (*HelloWorldLocalActivityOptions) WithLocalActivityOptions

WithLocalActivityOptions sets default LocalActivityOptions

type HelloWorldOptions

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

HelloWorldOptions provides configuration for a HelloWorld workflow operation

func NewHelloWorldOptions

func NewHelloWorldOptions() *HelloWorldOptions

NewHelloWorldOptions initializes a new HelloWorldOptions value

func (*HelloWorldOptions) WithStartWorkflowOptions

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

WithStartWorkflowOptions sets the initial client.StartWorkflowOptions

type HelloWorldOutput

type HelloWorldOutput struct {
	Result string `protobuf:"bytes,1,opt,name=result,proto3" json:"result,omitempty"`
	// contains filtered or unexported fields
}

HelloWorldOutput describes the output from a HelloWorld task

func HelloWorld

func HelloWorld(ctx workflow.Context, req *HelloWorldInput, options ...*HelloWorldActivityOptions) (*HelloWorldOutput, error)

HelloWorld describes a Temporal workflow and activity with the same name and signature

func HelloWorldChild

func HelloWorldChild(ctx workflow.Context, req *HelloWorldInput, options ...*HelloWorldChildOptions) (*HelloWorldOutput, error)

HelloWorld describes a Temporal workflow and activity with the same name and signature

func HelloWorldLocal

func HelloWorldLocal(ctx workflow.Context, req *HelloWorldInput, options ...*HelloWorldLocalActivityOptions) (*HelloWorldOutput, error)

HelloWorld describes a Temporal workflow and activity with the same name and signature

func (*HelloWorldOutput) Descriptor deprecated

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

Deprecated: Use HelloWorldOutput.ProtoReflect.Descriptor instead.

func (*HelloWorldOutput) GetResult

func (x *HelloWorldOutput) GetResult() string

func (*HelloWorldOutput) ProtoMessage

func (*HelloWorldOutput) ProtoMessage()

func (*HelloWorldOutput) ProtoReflect

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

func (*HelloWorldOutput) Reset

func (x *HelloWorldOutput) Reset()

func (*HelloWorldOutput) String

func (x *HelloWorldOutput) String() string

type HelloWorldRun

type HelloWorldRun 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) (*HelloWorldOutput, 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
}

HelloWorldRun describes a(n) HelloWorld workflow run

type HelloWorldWorkflow

type HelloWorldWorkflow interface {
	// Execute defines the entrypoint to a(n) HelloWorld workflow
	Execute(ctx workflow.Context) (*HelloWorldOutput, error)
}

HelloWorld describes a Temporal workflow and activity with the same name and signature

workflow details: (id: "hello_world/${! uuid_v4() }")

type HelloWorldWorkflowInput

type HelloWorldWorkflowInput struct {
	Req *HelloWorldInput
}

HelloWorldWorkflowInput describes the input to a(n) HelloWorld workflow constructor

type HelloWorldWorkflows

type HelloWorldWorkflows interface {
	// HelloWorld describes a Temporal workflow and activity with the same name
	// and signature
	HelloWorld(ctx workflow.Context, input *HelloWorldWorkflowInput) (HelloWorldWorkflow, error)
}

HelloWorldWorkflows provides methods for initializing new example.helloworld.v1.HelloWorld workflow values

type TestHelloWorldClient

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

TestClient provides a testsuite-compatible Client

func NewTestHelloWorldClient

func NewTestHelloWorldClient(env *testsuite.TestWorkflowEnvironment, workflows HelloWorldWorkflows, activities HelloWorldActivities) *TestHelloWorldClient

NewTestHelloWorldClient initializes a new TestHelloWorldClient value

func (*TestHelloWorldClient) CancelWorkflow

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

CancelWorkflow requests cancellation of an existing workflow execution

func (*TestHelloWorldClient) GetHelloWorld

func (c *TestHelloWorldClient) GetHelloWorld(ctx context.Context, workflowID string, runID string) HelloWorldRun

GetHelloWorld is a noop

func (*TestHelloWorldClient) HelloWorld

HelloWorld executes a(n) HelloWorld workflow in the test environment

func (*TestHelloWorldClient) HelloWorldAsync

func (c *TestHelloWorldClient) HelloWorldAsync(ctx context.Context, req *HelloWorldInput, options ...*HelloWorldOptions) (HelloWorldRun, error)

HelloWorldAsync executes a(n) HelloWorld workflow in the test environment

func (*TestHelloWorldClient) TerminateWorkflow

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