searchattributesv1

package
v1.13.1 Latest Latest
Warning

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

Go to latest
Published: May 14, 2024 License: MIT Imports: 26 Imported by: 0

Documentation

Overview

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

protoc-gen-go_temporal 1.13.1-next (b7a15c407f9a9490670a48b7f288c936cdd1bc48)
go go1.22.3
protoc (unknown)

source: example/searchattributes/v1/searchattributes.proto

Index

Constants

View Source
const ExampleTaskQueue = "searchattributes"

ExampleTaskQueue is the default task-queue for a example.searchattributes.v1.Example worker

View Source
const (
	SearchAttributesWorkflowName = "example.searchattributes.v1.Example.SearchAttributes"
)

example.searchattributes.v1.Example workflow names

Variables

View Source
var File_example_searchattributes_v1_searchattributes_proto protoreflect.FileDescriptor
View Source
var (
	// SearchAttributesFunction implements a "example.searchattributes.v1.Example.SearchAttributes" workflow
	SearchAttributesFunction func(workflow.Context, *SearchAttributesInput) error
)

Reference to generated workflow functions

View Source
var (
	SearchAttributesIdexpression = expression.MustParseExpression("search_attributes_${! uuid_v4() }")
)

example.searchattributes.v1.Example workflow id expressions

View Source
var (
	SearchAttributesSearchAttributesMapping = expression.MustParseMapping("CustomKeywordField = customKeywordField \nCustomTextField = customTextField \nCustomIntField = customIntField.int64() \nCustomDoubleField = customDoubleField \nCustomBoolField = customBoolField \nCustomDatetimeField = customDatetimeField.ts_parse(\"2006-01-02T15:04:05Z\") \n")
)

example.searchattributes.v1.Example workflow search attribute mappings

Functions

func NewExampleCli

func NewExampleCli(options ...*ExampleCliOptions) (*v2.App, error)

NewExampleCli initializes a cli for a(n) example.searchattributes.v1.Example service

func NewExampleCliCommand

func NewExampleCliCommand(options ...*ExampleCliOptions) (*v2.Command, error)

NewExampleCliCommand initializes a cli command for a example.searchattributes.v1.Example service with subcommands for each query, signal, update, and workflow

func NewExampleClientOptions

func NewExampleClientOptions() *exampleClientOptions

NewExampleClientOptions initializes a new exampleClientOptions value

func RegisterExampleActivities

func RegisterExampleActivities(r worker.ActivityRegistry, activities ExampleActivities)

RegisterExampleActivities registers activities with a worker

func RegisterExampleWorkflows

func RegisterExampleWorkflows(r worker.WorkflowRegistry, workflows ExampleWorkflows)

RegisterExampleWorkflows registers example.searchattributes.v1.Example workflows with the given worker

func RegisterSearchAttributesWorkflow

func RegisterSearchAttributesWorkflow(r worker.WorkflowRegistry, wf func(workflow.Context, *SearchAttributesWorkflowInput) (SearchAttributesWorkflow, error))

RegisterSearchAttributesWorkflow registers a example.searchattributes.v1.Example.SearchAttributes workflow with the given worker

func SearchAttributesChild

func SearchAttributesChild(ctx workflow.Context, req *SearchAttributesInput, options ...*SearchAttributesChildOptions) error

SearchAttributesChild executes a child example.searchattributes.v1.Example.SearchAttributes workflow and blocks until error or response received

func WithExampleSchemeTypes

func WithExampleSchemeTypes() scheme.Option

WithExampleSchemeTypes registers all Example protobuf types with the given scheme

Types

type ExampleActivities

type ExampleActivities interface{}

ExampleActivities describes available worker activities

type ExampleCliOptions

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

ExampleCliOptions describes runtime configuration for example.searchattributes.v1.Example cli

func NewExampleCliOptions

func NewExampleCliOptions() *ExampleCliOptions

NewExampleCliOptions initializes a new ExampleCliOptions value

func (*ExampleCliOptions) WithAfter

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

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

func (*ExampleCliOptions) WithBefore

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

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

func (*ExampleCliOptions) WithClient

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

WithClient provides a Temporal client factory for use by commands

func (*ExampleCliOptions) WithWorker

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

WithWorker provides an method for initializing a worker

type ExampleClient

type ExampleClient interface {
	// SearchAttributes executes a(n) example.searchattributes.v1.Example.SearchAttributes workflow and blocks until error or response received
	SearchAttributes(ctx context.Context, req *SearchAttributesInput, opts ...*SearchAttributesOptions) error

	// SearchAttributesAsync starts a(n) example.searchattributes.v1.Example.SearchAttributes workflow and returns a handle to the workflow run
	SearchAttributesAsync(ctx context.Context, req *SearchAttributesInput, opts ...*SearchAttributesOptions) (SearchAttributesRun, error)

	// GetSearchAttributes retrieves a handle to an existing example.searchattributes.v1.Example.SearchAttributes workflow execution
	GetSearchAttributes(ctx context.Context, workflowID string, runID string) SearchAttributesRun

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

ExampleClient describes a client for a(n) example.searchattributes.v1.Example worker

func NewExampleClient

func NewExampleClient(c client.Client, options ...*exampleClientOptions) ExampleClient

NewExampleClient initializes a new example.searchattributes.v1.Example client

func NewExampleClientWithOptions

func NewExampleClientWithOptions(c client.Client, opts client.Options, options ...*exampleClientOptions) (ExampleClient, error)

NewExampleClientWithOptions initializes a new Example client with the given options

type ExampleWorkflowFunctions added in v1.12.0

type ExampleWorkflowFunctions interface {
	// SearchAttributes executes a "example.searchattributes.v1.Example.SearchAttributes" workflow inline
	SearchAttributes(workflow.Context, *SearchAttributesInput) error
}

ExampleWorkflowFunctions describes a mockable dependency for inlining workflows within other workflows

func NewExampleWorkflowFunctions added in v1.12.0

func NewExampleWorkflowFunctions() ExampleWorkflowFunctions

type ExampleWorkflows

type ExampleWorkflows interface {
	// SearchAttributes initializes a new a(n) SearchAttributesWorkflow implementation
	SearchAttributes(ctx workflow.Context, input *SearchAttributesWorkflowInput) (SearchAttributesWorkflow, error)
}

ExampleWorkflows provides methods for initializing new example.searchattributes.v1.Example workflow values

type SearchAttributesChildOptions

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

SearchAttributesChildOptions provides configuration for a child example.searchattributes.v1.Example.SearchAttributes workflow operation

func NewSearchAttributesChildOptions

func NewSearchAttributesChildOptions() *SearchAttributesChildOptions

NewSearchAttributesChildOptions initializes a new SearchAttributesChildOptions value

func (*SearchAttributesChildOptions) Build added in v1.13.0

Build initializes a new go.temporal.io/sdk/workflow.ChildWorkflowOptions value with defaults and overrides applied

func (*SearchAttributesChildOptions) WithChildWorkflowOptions

WithChildWorkflowOptions sets the initial go.temporal.io/sdk/workflow.ChildWorkflowOptions

func (*SearchAttributesChildOptions) WithExecutionTimeout added in v1.13.0

WithExecutionTimeout sets the WorkflowExecutionTimeout value

func (*SearchAttributesChildOptions) WithID added in v1.13.0

WithID sets the WorkflowID value

func (*SearchAttributesChildOptions) WithIDReusePolicy added in v1.13.0

WithIDReusePolicy sets the WorkflowIDReusePolicy value

func (*SearchAttributesChildOptions) WithParentClosePolicy added in v1.13.0

WithParentClosePolicy sets the WorkflowIDReusePolicy value

func (*SearchAttributesChildOptions) WithRetryPolicy added in v1.13.0

WithRetryPolicy sets the RetryPolicy value

func (*SearchAttributesChildOptions) WithRunTimeout added in v1.13.0

WithRunTimeout sets the WorkflowRunTimeout value

func (*SearchAttributesChildOptions) WithSearchAttributes added in v1.13.0

func (o *SearchAttributesChildOptions) WithSearchAttributes(sa map[string]any) *SearchAttributesChildOptions

WithSearchAttributes sets the SearchAttributes value

func (*SearchAttributesChildOptions) WithTaskQueue added in v1.13.0

WithTaskQueue sets the TaskQueue value

func (*SearchAttributesChildOptions) WithTaskTimeout added in v1.13.0

WithTaskTimeout sets the WorkflowTaskTimeout value

func (*SearchAttributesChildOptions) WithWaitForCancellation added in v1.13.0

func (o *SearchAttributesChildOptions) WithWaitForCancellation(wait bool) *SearchAttributesChildOptions

WithWaitForCancellation sets the WaitForCancellation value

type SearchAttributesChildRun

type SearchAttributesChildRun struct {
	Future workflow.ChildWorkflowFuture
}

SearchAttributesChildRun describes a child SearchAttributes workflow run

func SearchAttributesChildAsync

func SearchAttributesChildAsync(ctx workflow.Context, req *SearchAttributesInput, options ...*SearchAttributesChildOptions) (*SearchAttributesChildRun, error)

SearchAttributesChildAsync starts a child example.searchattributes.v1.Example.SearchAttributes workflow and returns a handle to the child workflow run

func (*SearchAttributesChildRun) Get

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

func (*SearchAttributesChildRun) Select

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

func (*SearchAttributesChildRun) SelectStart

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

func (*SearchAttributesChildRun) WaitStart

WaitStart waits for the child workflow to start

type SearchAttributesInput

type SearchAttributesInput struct {
	CustomKeywordField  string                 `protobuf:"bytes,1,opt,name=custom_keyword_field,json=customKeywordField,proto3" json:"custom_keyword_field,omitempty"`
	CustomTextField     string                 `protobuf:"bytes,2,opt,name=custom_text_field,json=customTextField,proto3" json:"custom_text_field,omitempty"`
	CustomIntField      int64                  `protobuf:"varint,3,opt,name=custom_int_field,json=customIntField,proto3" json:"custom_int_field,omitempty"`
	CustomDoubleField   float64                `protobuf:"fixed64,4,opt,name=custom_double_field,json=customDoubleField,proto3" json:"custom_double_field,omitempty"`
	CustomBoolField     bool                   `protobuf:"varint,5,opt,name=custom_bool_field,json=customBoolField,proto3" json:"custom_bool_field,omitempty"`
	CustomDatetimeField *timestamppb.Timestamp `protobuf:"bytes,6,opt,name=custom_datetime_field,json=customDatetimeField,proto3" json:"custom_datetime_field,omitempty"`
	// contains filtered or unexported fields
}

func UnmarshalCliFlagsToSearchAttributesInput

func UnmarshalCliFlagsToSearchAttributesInput(cmd *v2.Context) (*SearchAttributesInput, error)

UnmarshalCliFlagsToSearchAttributesInput unmarshals a SearchAttributesInput from command line flags

func (*SearchAttributesInput) Descriptor deprecated

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

Deprecated: Use SearchAttributesInput.ProtoReflect.Descriptor instead.

func (*SearchAttributesInput) GetCustomBoolField

func (x *SearchAttributesInput) GetCustomBoolField() bool

func (*SearchAttributesInput) GetCustomDatetimeField

func (x *SearchAttributesInput) GetCustomDatetimeField() *timestamppb.Timestamp

func (*SearchAttributesInput) GetCustomDoubleField

func (x *SearchAttributesInput) GetCustomDoubleField() float64

func (*SearchAttributesInput) GetCustomIntField

func (x *SearchAttributesInput) GetCustomIntField() int64

func (*SearchAttributesInput) GetCustomKeywordField

func (x *SearchAttributesInput) GetCustomKeywordField() string

func (*SearchAttributesInput) GetCustomTextField

func (x *SearchAttributesInput) GetCustomTextField() string

func (*SearchAttributesInput) ProtoMessage

func (*SearchAttributesInput) ProtoMessage()

func (*SearchAttributesInput) ProtoReflect

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

func (*SearchAttributesInput) Reset

func (x *SearchAttributesInput) Reset()

func (*SearchAttributesInput) String

func (x *SearchAttributesInput) String() string

type SearchAttributesOptions

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

SearchAttributesOptions provides configuration for a example.searchattributes.v1.Example.SearchAttributes workflow operation

func NewSearchAttributesOptions

func NewSearchAttributesOptions() *SearchAttributesOptions

NewSearchAttributesOptions initializes a new SearchAttributesOptions value

func (*SearchAttributesOptions) Build added in v1.13.0

Build initializes a new go.temporal.io/sdk/client.StartWorkflowOptions value with defaults and overrides applied

func (*SearchAttributesOptions) WithExecutionTimeout added in v1.13.0

func (o *SearchAttributesOptions) WithExecutionTimeout(d time.Duration) *SearchAttributesOptions

WithExecutionTimeout sets the WorkflowExecutionTimeout value

func (*SearchAttributesOptions) WithID added in v1.13.0

WithID sets the ID value

func (*SearchAttributesOptions) WithIDReusePolicy added in v1.13.0

WithIDReusePolicy sets the WorkflowIDReusePolicy value

func (*SearchAttributesOptions) WithRetryPolicy added in v1.13.0

WithRetryPolicy sets the RetryPolicy value

func (*SearchAttributesOptions) WithRunTimeout added in v1.13.0

WithRunTimeout sets the WorkflowRunTimeout value

func (*SearchAttributesOptions) WithSearchAttributes added in v1.13.0

func (o *SearchAttributesOptions) WithSearchAttributes(sa map[string]any) *SearchAttributesOptions

WithSearchAttributes sets the SearchAttributes value

func (*SearchAttributesOptions) WithStartWorkflowOptions

func (o *SearchAttributesOptions) WithStartWorkflowOptions(options client.StartWorkflowOptions) *SearchAttributesOptions

WithStartWorkflowOptions sets the initial go.temporal.io/sdk/client.StartWorkflowOptions

func (*SearchAttributesOptions) WithTaskQueue added in v1.13.0

WithTaskQueue sets the TaskQueue value

func (*SearchAttributesOptions) WithTaskTimeout added in v1.13.0

WithTaskTimeout sets the WorkflowTaskTimeout value

type SearchAttributesRun

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

SearchAttributesRun describes a(n) example.searchattributes.v1.Example.SearchAttributes workflow run

type SearchAttributesWorkflow

type SearchAttributesWorkflow interface {
	// Execute defines the entrypoint to a(n) example.searchattributes.v1.Example.SearchAttributes workflow
	Execute(ctx workflow.Context) error
}

SearchAttributesWorkflow describes a(n) example.searchattributes.v1.Example.SearchAttributes workflow implementation

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

type SearchAttributesWorkflowInput

type SearchAttributesWorkflowInput struct {
	Req *SearchAttributesInput
}

SearchAttributesWorkflowInput describes the input to a(n) example.searchattributes.v1.Example.SearchAttributes workflow constructor

type TestExampleClient

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

TestClient provides a testsuite-compatible Client

func NewTestExampleClient

func NewTestExampleClient(env *testsuite.TestWorkflowEnvironment, workflows ExampleWorkflows, activities ExampleActivities) *TestExampleClient

NewTestExampleClient initializes a new TestExampleClient value

func (*TestExampleClient) CancelWorkflow

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

CancelWorkflow requests cancellation of an existing workflow execution

func (*TestExampleClient) GetSearchAttributes

func (c *TestExampleClient) GetSearchAttributes(ctx context.Context, workflowID string, runID string) SearchAttributesRun

GetSearchAttributes is a noop

func (*TestExampleClient) SearchAttributes

func (c *TestExampleClient) SearchAttributes(ctx context.Context, req *SearchAttributesInput, opts ...*SearchAttributesOptions) error

SearchAttributes executes a(n) example.searchattributes.v1.Example.SearchAttributes workflow in the test environment

func (*TestExampleClient) SearchAttributesAsync

func (c *TestExampleClient) SearchAttributesAsync(ctx context.Context, req *SearchAttributesInput, options ...*SearchAttributesOptions) (SearchAttributesRun, error)

SearchAttributesAsync executes a(n) example.searchattributes.v1.Example.SearchAttributes workflow in the test environment

func (*TestExampleClient) TerminateWorkflow

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