Documentation ¶
Index ¶
- func NewFuture[T any]() (Future[T], FutureResolver[T])
- func QueryWorkflow[Wf Workflow[WfIn, WfOut], WfIn, WfOut, In, Out any](context.Context, *WorkflowHandle[Wf, WfIn, WfOut], func(Wf, In) (Out, error), ...) (Out, error)
- func RegisterActivities[Act any](worker.Worker, Act)
- func RegisterWorkflow[Wf Workflow[In, Out], In, Out any](worker.Worker, Wf)
- func Select(Context, ...SelectCase) error
- func SignalWorkflow[Wf Workflow[WfIn, WfOut], WfIn, WfOut, In any](context.Context, *WorkflowHandle[Wf, WfIn, WfOut], func(Wf, Context, In), In, ...) error
- type Activity
- type Channel
- type Context
- type CustomNaming
- type ExecuteActivityOptions
- type Future
- type FutureResolver
- type QueryWorkflowOptions
- 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 SignalWorkflowOptions
- type StartWorkflowOptions
- type Workflow
- type WorkflowHandle
- func GetWorkflowHandle[Wf Workflow[In, Out], In, Out any](client client.Client, workflowRun func(Wf, Context, In) (Out, error), ...) *WorkflowHandle[Wf, In, Out]
- func GetWorkflowHandleForRunID[Wf Workflow[In, Out], In, Out any](client client.Client, workflowRun func(Wf, Context, In) (Out, error), ...) *WorkflowHandle[Wf, In, Out]
- func StartWorkflow[Wf Workflow[In, Out], In, Out any](context.Context, client.Client, func(Wf, Context, In) (Out, error), In, ...) (*WorkflowHandle[Wf, In, Out], error)
- type WorkflowRef
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewFuture ¶
func NewFuture[T any]() (Future[T], FutureResolver[T])
func QueryWorkflow ¶
func QueryWorkflow[Wf Workflow[WfIn, WfOut], WfIn, WfOut, In, Out any]( context.Context, *WorkflowHandle[Wf, WfIn, WfOut], func(Wf, In) (Out, error), In, QueryWorkflowOptions, ) (Out, error)
func RegisterActivities ¶
func Select ¶
func Select(Context, ...SelectCase) error
func SignalWorkflow ¶
func SignalWorkflow[Wf Workflow[WfIn, WfOut], WfIn, WfOut, In any]( context.Context, *WorkflowHandle[Wf, WfIn, WfOut], func(Wf, Context, In), In, SignalWorkflowOptions, ) error
Types ¶
type Context ¶
type Context interface { Done() ReceiveChannel[struct{}] Err() error Value(any) any }
type CustomNaming ¶
type CustomNaming[Meta any] interface { }
type ExecuteActivityOptions ¶
type ExecuteActivityOptions struct { }
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 QueryWorkflowOptions ¶
type QueryWorkflowOptions 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 SignalWorkflowOptions ¶
type SignalWorkflowOptions struct { }
type StartWorkflowOptions ¶
type WorkflowHandle ¶
type WorkflowHandle[Wf Workflow[In, Out], In, Out any] struct { Client client.Client ID string RunID string ResultRunID string }
func GetWorkflowHandle ¶
func StartWorkflow ¶
func (*WorkflowHandle[Wf, In, Out]) Get ¶
func (*WorkflowHandle[Wf, In, Out]) Get(context.Context) (Out, error)
func (*WorkflowHandle[Wf, In, Out]) GetID ¶
func (*WorkflowHandle[Wf, In, Out]) GetID() string
func (*WorkflowHandle[Wf, In, Out]) GetRunID ¶
func (*WorkflowHandle[Wf, In, Out]) GetRunID() string
type WorkflowRef ¶
Click to show internal directories.
Click to hide internal directories.