Documentation
¶
Index ¶
- func DecorateStarterForTests(temporalModule *module.Module, timeout time.Duration) *module.Module
- func ExecuteWorkflow(ctx context.Context, starter Starter, options client.StartWorkflowOptions, ...) (client.WorkflowRun, error)
- func Name(method interface{}) string
- func NewFuture[T any](ctx workflow.Context) (Future[T], Settable[T])
- func NewManifesto() module.Manifesto
- func NewModule() *module.Module
- func OverrideStarter[T Starter](temporalModule *module.Module) *module.Module
- func Provide[T Registerer](register interface{}, opts ...RegisterOption) fx.Option
- func RegisterActivity(registry worker.Registry, a interface{})
- func RegisterWorkflow(registry worker.Registry, w interface{})
- func ScheduleAnnotation[T Schedule]() interface{}
- func SchedulerCommand(scheduler *Scheduler) *cli.Command
- func ShouldContinueAsNew(ctx workflow.Context) bool
- func SideEffect[T any](ctx workflow.Context, f func(ctx workflow.Context) T) (T, error)
- func WaitActivity[O any](ctx workflow.Context, activity interface{}, input ...any) (O, error)
- func WaitActivityWithoutResult(ctx workflow.Context, activity interface{}, input ...any) error
- func WorkerCommand(w *Worker) *cli.Command
- func WorkflowName(w interface{}) string
- type Channel
- func (c Channel[T]) Close()
- func (c Channel[T]) Receive(ctx workflow.Context) (t T, more bool)
- func (c Channel[T]) ReceiveWithTimeout(ctx workflow.Context, timeout time.Duration) (t T, ok bool, more bool)
- func (c Channel[T]) Send(ctx workflow.Context, value T)
- func (c Channel[T]) SendAsync(value T) (ok bool)
- type Config
- type Future
- type RegisterOption
- type Registerer
- type Schedule
- type Scheduler
- type SchedulerParams
- type Settable
- type Starter
- type TestingStarter
- func (s TestingStarter) ExecuteWorkflow(ctx context.Context, options client.StartWorkflowOptions, workflow interface{}, ...) (client.WorkflowRun, error)
- func (s TestingStarter) SignalWithStartWorkflow(ctx context.Context, workflowID string, signalName string, ...) (client.WorkflowRun, error)
- func (s TestingStarter) SignalWorkflow(ctx context.Context, workflowID string, runID string, signalName string, ...) error
- type TestingWorkflowRun
- type WaitGroup
- type Worker
- type WorkersParams
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DecorateStarterForTests ¶
func ExecuteWorkflow ¶
func ExecuteWorkflow( ctx context.Context, starter Starter, options client.StartWorkflowOptions, workflow interface{}, args ...interface{}, ) (client.WorkflowRun, error)
func Name ¶
func Name(method interface{}) string
Name returns the full name of the workflow or activity function when the function is the method of a struct. This package registers and calls workflows and activities using this method of the function transformation. The native temporal SDK uses the function name only as the name of the workflow or activity. Due to this, if you register several workflows or activities with the same name, the last one will override the previous ones.
func NewManifesto ¶
func OverrideStarter ¶
func Provide ¶
func Provide[T Registerer](register interface{}, opts ...RegisterOption) fx.Option
func RegisterActivity ¶
func RegisterWorkflow ¶
func ScheduleAnnotation ¶
func ScheduleAnnotation[T Schedule]() interface{}
func SchedulerCommand ¶
SchedulerCommand runs a command to add or updates Temporal schedules.
func ShouldContinueAsNew ¶
func SideEffect ¶
func WaitActivity ¶
func WorkerCommand ¶
func WorkflowName ¶
func WorkflowName(w interface{}) string
Types ¶
type Channel ¶
type Channel[T any] struct { // contains filtered or unexported fields }
func (Channel[T]) ReceiveWithTimeout ¶
type Future ¶
func ExecuteActivity ¶
func (Future[T]) GetOrDefault ¶
func (Future[T]) GetWithTimeout ¶
type RegisterOption ¶
type RegisterOption func() interface{}
type Registerer ¶
type Schedule ¶
type Schedule interface {
Schedule(queue string) client.ScheduleOptions
}
type Scheduler ¶
type Scheduler struct {
// contains filtered or unexported fields
}
func NewScheduler ¶
func NewScheduler(params SchedulerParams) *Scheduler
type SchedulerParams ¶
type Starter ¶
type Starter interface {
ExecuteWorkflow(
ctx context.Context,
options client.StartWorkflowOptions,
workflow interface{},
args ...interface{},
) (client.WorkflowRun, error)
SignalWithStartWorkflow(
ctx context.Context,
workflowID string,
signalName string,
signalArg interface{},
options client.StartWorkflowOptions,
workflow interface{},
workflowArgs ...interface{},
) (client.WorkflowRun, error)
SignalWorkflow(ctx context.Context, workflowID string, runID string, signalName string, arg interface{}) error
}
Look client.Client interface
func NewStarter ¶
type TestingStarter ¶
type TestingStarter struct {
// contains filtered or unexported fields
}
func NewTestingStarter ¶
func NewTestingStarter(env *testsuite.TestWorkflowEnvironment) *TestingStarter
func (TestingStarter) ExecuteWorkflow ¶
func (s TestingStarter) ExecuteWorkflow( ctx context.Context, options client.StartWorkflowOptions, workflow interface{}, args ...interface{}, ) (client.WorkflowRun, error)
func (TestingStarter) SignalWithStartWorkflow ¶
func (s TestingStarter) SignalWithStartWorkflow( ctx context.Context, workflowID string, signalName string, signalArg interface{}, options client.StartWorkflowOptions, workflow interface{}, workflowArgs ...interface{}, ) (client.WorkflowRun, error)
func (TestingStarter) SignalWorkflow ¶
type TestingWorkflowRun ¶
type TestingWorkflowRun struct {
// contains filtered or unexported fields
}
func (*TestingWorkflowRun) Get ¶
func (r *TestingWorkflowRun) Get(ctx context.Context, valuePtr interface{}) error
func (*TestingWorkflowRun) GetID ¶
func (r *TestingWorkflowRun) GetID() string
func (*TestingWorkflowRun) GetRunID ¶
func (r *TestingWorkflowRun) GetRunID() string
func (*TestingWorkflowRun) GetWithOptions ¶
func (r *TestingWorkflowRun) GetWithOptions( ctx context.Context, valuePtr interface{}, options client.WorkflowRunGetOptions, ) error
type WaitGroup ¶
type WaitGroup struct {
// contains filtered or unexported fields
}
func NewWaitGroup ¶
type Worker ¶
type Worker struct {
// contains filtered or unexported fields
}
func NewWorker ¶
func NewWorker(params WorkersParams) *Worker
type WorkersParams ¶
Source Files
¶
Click to show internal directories.
Click to hide internal directories.