temporalng1

package
v0.0.0-...-cf623d3 Latest Latest
Warning

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

Go to latest
Published: Feb 8, 2023 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewFuture

func NewFuture[T any]() (Future[T], FutureResolver[T])

func Select

func Select(Context, ...SelectCase) error

Types

type Activity

type Activity[In, Out any] struct {
	Name string
}

func (*Activity[In, Out]) Execute

func (*Activity[In, Out]) Execute(Context, In, ActivityExecuteOptions) *Future[Out]

func (*Activity[In, Out]) Register

func (*Activity[In, Out]) Register(worker.Worker, func(context.Context, In) (Out, error))

type ActivityExecuteOptions

type ActivityExecuteOptions struct {
}

type Channel

type Channel[T any] struct {
	SendChannel[T]
	ReceiveChannel[T]
}

func NewChannel

func NewChannel[T any](buffered int) *Channel[T]

type Context

type Context interface {
	Done() ReceiveChannel[struct{}]
	Err() error
	Value(any) any
}

type Future

type Future[T any] struct {
}

func (Future[T]) Get

func (Future[T]) Get() (T, error)

type FutureResolver

type FutureResolver[T any] struct {
}

func (FutureResolver[T]) Resolve

func (FutureResolver[T]) Resolve(T)

func (FutureResolver[T]) ResolveError

func (FutureResolver[T]) ResolveError(error)

type Query

type Query[In, Out any] struct {
	Name string
}

func (*Query[In, Out]) Invoke

func (*Query[In, Out]) Invoke(context.Context, WorkflowRef, In, QueryInvokeOptions) (Out, error)

func (*Query[In, Out]) SetHandler

func (*Query[In, Out]) SetHandler(Context, func(In) (Out, error))

type QueryInvokeOptions

type QueryInvokeOptions struct {
}

type ReceiveChannel

type ReceiveChannel[T any] struct {
}

func (ReceiveChannel[T]) Receive

func (ReceiveChannel[T]) Receive() T

func (ReceiveChannel[T]) TryReceive

func (ReceiveChannel[T]) TryReceive() (T, bool)

type SelectCase

type SelectCase interface {
	// contains filtered or unexported methods
}

func SelectCaseDefault

func SelectCaseDefault(func() error) SelectCase

func SelectCaseFuture

func SelectCaseFuture[T any](Future[T], func(T) error) SelectCase

func SelectCaseReceive

func SelectCaseReceive[T any](ReceiveChannel[T], func(Context, T) error) SelectCase

func SelectCaseSend

func SelectCaseSend[T any](SendChannel[T], T, func() error) SelectCase

func SelectCaseTryReceive

func SelectCaseTryReceive[T any](ReceiveChannel[T], func(Context, T, bool) error) SelectCase

type SendChannel

type SendChannel[T any] struct {
}

func (SendChannel[T]) Send

func (SendChannel[T]) Send(T)

type Signal

type Signal[In any] struct {
	Name string
}

func (*Signal[In]) GetChannel

func (*Signal[In]) GetChannel(Context) *ReceiveChannel[In]

func (*Signal[In]) Send

type SignalSendOptions

type SignalSendOptions struct {
}

type Workflow

type Workflow[In, Out any] struct {
	Name string
}

func (*Workflow[In, Out]) Execute

func (*Workflow[In, Out]) Execute(context.Context, client.Client, In, WorkflowStartOptions) (Out, error)

func (*Workflow[In, Out]) GetWorkflowHandle

func (*Workflow[In, Out]) GetWorkflowHandle(client client.Client, id string) *WorkflowHandle[Out]

func (*Workflow[In, Out]) GetWorkflowHandleForRunID

func (*Workflow[In, Out]) GetWorkflowHandleForRunID(client client.Client, id, runID string) *WorkflowHandle[Out]

func (*Workflow[In, Out]) Register

func (*Workflow[In, Out]) Register(worker.Worker, func(Context, In) (Out, error))

func (*Workflow[In, Out]) Start

type WorkflowHandle

type WorkflowHandle[Out any] struct {
	Client      client.Client
	ID          string
	RunID       string
	ResultRunID string
}

func (*WorkflowHandle[Out]) Get

func (*WorkflowHandle[Out]) Get(context.Context) (Out, error)

func (*WorkflowHandle[Out]) GetID

func (*WorkflowHandle[Out]) GetID() string

func (*WorkflowHandle[Out]) GetRunID

func (*WorkflowHandle[Out]) GetRunID() string

type WorkflowRef

type WorkflowRef interface {
	GetID() string
	GetRunID() string
}

type WorkflowStartOptions

type WorkflowStartOptions struct {
	ID        string
	TaskQueue string
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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