Documentation ¶
Index ¶
- func NewFuture[T any]() (Future[T], FutureResolver[T])
- func Select(Context, ...SelectCase) error
- type Activity
- type ActivityExecuteOptions
- type Channel
- type Context
- type Future
- type FutureResolver
- type Query
- type QueryInvokeOptions
- type ReceiveChannel
- type SelectCase
- func SelectCaseDefault(func() error) SelectCase
- func SelectCaseFuture[T any](Future[T], func(T) error) SelectCase
- func SelectCaseReceive[T any](ReceiveChannel[T], func(Context, T) error) SelectCase
- func SelectCaseSend[T any](SendChannel[T], T, func() error) SelectCase
- func SelectCaseTryReceive[T any](ReceiveChannel[T], func(Context, T, bool) error) SelectCase
- type SendChannel
- type Signal
- type SignalSendOptions
- type Workflow
- func (*Workflow[In, Out]) Execute(context.Context, client.Client, In, WorkflowStartOptions) (Out, error)
- func (*Workflow[In, Out]) GetWorkflowHandle(client client.Client, id string) *WorkflowHandle[Out]
- func (*Workflow[In, Out]) GetWorkflowHandleForRunID(client client.Client, id, runID string) *WorkflowHandle[Out]
- func (*Workflow[In, Out]) Register(worker.Worker, func(Context, In) (Out, error))
- func (*Workflow[In, Out]) Start(context.Context, client.Client, In, WorkflowStartOptions) (*WorkflowHandle[Out], error)
- type WorkflowHandle
- type WorkflowRef
- type WorkflowStartOptions
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 ActivityExecuteOptions ¶
type ActivityExecuteOptions struct { }
type Context ¶
type Context interface { Done() ReceiveChannel[struct{}] Err() error Value(any) any }
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 ¶
func (*Query[In, Out]) Invoke ¶
func (*Query[In, Out]) Invoke(context.Context, WorkflowRef, In, QueryInvokeOptions) (Out, error)
func (*Query[In, Out]) SetHandler ¶
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 ¶
func (*Signal[In]) GetChannel ¶
func (*Signal[In]) GetChannel(Context) *ReceiveChannel[In]
func (*Signal[In]) Send ¶
func (*Signal[In]) Send(context.Context, WorkflowRef, In, SignalSendOptions) error
type SignalSendOptions ¶
type SignalSendOptions struct { }
type Workflow ¶
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]) Start ¶
func (*Workflow[In, Out]) Start(context.Context, client.Client, In, WorkflowStartOptions) (*WorkflowHandle[Out], error)
type WorkflowHandle ¶
type WorkflowHandle[Out any] struct { Client client.Client ID string RunID string ResultRunID string }
func (*WorkflowHandle[Out]) GetID ¶
func (*WorkflowHandle[Out]) GetID() string
func (*WorkflowHandle[Out]) GetRunID ¶
func (*WorkflowHandle[Out]) GetRunID() string
type WorkflowRef ¶
type WorkflowStartOptions ¶
Click to show internal directories.
Click to hide internal directories.