Documentation
¶
Index ¶
- type Option
- func WithAddActivity(t *testing.T, name string, a func(task.ActivityContext) (any, error)) Option
- func WithAddActivityN(t *testing.T, index int, name string, ...) Option
- func WithAddOrchestrator(t *testing.T, name string, or func(*task.WorkflowContext) (any, error)) Option
- func WithAddWorkflowN(t *testing.T, index int, name string, ...) Option
- func WithDaprdOptions(index int, opts ...daprd.Option) Option
- func WithDaprds(daprds int) Option
- func WithMTLS(t *testing.T) Option
- func WithNoDB() Option
- func WithPlacementOptions(opts ...placement.Option) Option
- func WithSchedulerAddress(addr string) Option
- func WithSchedulerInstance(sched *scheduler.Scheduler) Option
- func WithSchedulerOptions(opts ...scheduler.Option) Option
- func WithSigningDisabledN(index int) Option
- type Workflow
- func (w *Workflow) BackendClient(t *testing.T, ctx context.Context) *client.TaskHubGrpcClient
- func (w *Workflow) BackendClientN(t *testing.T, ctx context.Context, index int) *client.TaskHubGrpcClient
- func (w *Workflow) Cleanup(t *testing.T)
- func (w *Workflow) DB() *sqlite.SQLite
- func (w *Workflow) Dapr() *daprd.Daprd
- func (w *Workflow) DaprN(i int) *daprd.Daprd
- func (w *Workflow) GRPCClient(t *testing.T, ctx context.Context) rtv1.DaprClient
- func (w *Workflow) GRPCClientN(t *testing.T, ctx context.Context, index int) rtv1.DaprClient
- func (w *Workflow) Metrics(t *testing.T, ctx context.Context) map[string]float64
- func (w *Workflow) Placement() *placement.Placement
- func (w *Workflow) Registry() *task.TaskRegistry
- func (w *Workflow) RegistryN(index int) *task.TaskRegistry
- func (w *Workflow) ResetRegistry(t *testing.T)
- func (w *Workflow) Run(t *testing.T, ctx context.Context)
- func (w *Workflow) Scheduler() *scheduler.Scheduler
- func (w *Workflow) Sentry() *sentry.Sentry
- func (w *Workflow) WaitUntilRunning(t *testing.T, ctx context.Context)
- func (w *Workflow) WorkflowClient(t *testing.T, ctx context.Context) *workflow.Client
- func (w *Workflow) WorkflowClientN(t *testing.T, ctx context.Context, index int) *workflow.Client
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Option ¶
type Option func(*options)
func WithAddActivity ¶ added in v1.16.0
func WithAddActivityN ¶
func WithAddOrchestrator ¶ added in v1.16.0
func WithAddWorkflowN ¶
func WithDaprdOptions ¶ added in v1.16.0
func WithDaprds ¶ added in v1.15.6
func WithMTLS ¶
WithMTLS spins up a Sentry process for mTLS and enables the WorkflowHistorySigning feature flag on every daprd in the workflow.
func WithPlacementOptions ¶
func WithSchedulerAddress ¶ added in v1.17.7
WithSchedulerAddress overrides the address used for the daprd's --scheduler-host-address flag. Use this to point daprd at a proxy that fronts the real scheduler.
func WithSchedulerInstance ¶ added in v1.17.7
WithSchedulerInstance lets a test supply a pre-constructed scheduler. The framework uses this scheduler instead of creating its own and skips adding it to its process list (the caller is responsible for that). Combine with WithSchedulerAddress when interposing a proxy.
func WithSchedulerOptions ¶
func WithSigningDisabledN ¶
WithSigningDisabledN excludes the daprd at the given index from having the WorkflowHistorySigning feature flag set. Has no effect without WithMTLS.
type Workflow ¶
type Workflow struct {
// contains filtered or unexported fields
}
func (*Workflow) BackendClient ¶
func (*Workflow) BackendClientN ¶ added in v1.16.0
func (w *Workflow) BackendClientN(t *testing.T, ctx context.Context, index int) *client.TaskHubGrpcClient
BackendClient returns a backend client for the specified index
func (*Workflow) GRPCClient ¶
func (*Workflow) GRPCClientN ¶ added in v1.16.0
GRPCClientForApp returns a GRPC client for the specified app index
func (*Workflow) Registry ¶ added in v1.15.0
func (w *Workflow) Registry() *task.TaskRegistry
func (*Workflow) RegistryN ¶ added in v1.16.0
func (w *Workflow) RegistryN(index int) *task.TaskRegistry
Registry returns the registry for a specific index