Documentation ¶
Index ¶
- Constants
- Variables
- func NewTestFailedError(msgs []string) error
- func Run(cli client.Client, queue string, id string, plan Plan, output any) error
- func Worker(w worker.Worker, reg Registry)
- type Plan
- type Registry
- type Runner
- type T
- func (t *T) Errorf(format string, args ...any)
- func (t *T) FailNow()
- func (t *T) Go(fn func(t *T))
- func (t *T) Run(name string, fn func(*T))
- func (t *T) RunAsChild(fn any, input any, output any)
- func (t *T) SetActivityOptions(options workflow.ActivityOptions)
- func (t *T) Task(task any, input any, output any) error
- func (t *T) WaitGroup() *WaitGroup
- func (t *T) Warnf(format string, args ...any)
- type Task
- type Test
- type TestFailedError
- type TestingT
- type WaitGroup
Constants ¶
View Source
const TestFailedErrorType = "TestFailedError"
Variables ¶
View Source
var ( ErrWorkflowExecute = errors.New("execute workflow") ErrWorkflowAwait = errors.New("await workflow") ErrWorkflow = errors.New("workflow") ErrFuture = errors.New("future") ErrTest = errors.New("test") )
View Source
var DefaultActivityOptions = workflow.ActivityOptions{ StartToCloseTimeout: time.Minute, RetryPolicy: &temporal.RetryPolicy{ MaximumAttempts: 1, }, }
Functions ¶
func NewTestFailedError ¶
Types ¶
type T ¶
type T struct {
// contains filtered or unexported fields
}
func (*T) SetActivityOptions ¶
func (t *T) SetActivityOptions(options workflow.ActivityOptions)
type Test ¶
func NewTest ¶
NewTest wraps fn in a workflowWrapper, that can be passed to temporal Worker:
mytest := tempo.NewTest(func(*T)) w.RegisterWorkflowWithOptions(mytest.Function(), workflow.RegisterOptions{ Name: mytest.Name(), })
func NewTestWithInput ¶
NewTestWithInput wraps fn in a workflowWrapper, that can be passed to temporal Worker:
mytest := tempo.NewTestWithInput(func(*T, string)) w.RegisterWorkflowWithOptions(mytest.Function(), workflow.RegisterOptions{ Name: mytest.Name(), })
func NewTestWithInputAndOutput ¶
NewTestWithInputAndOutput wraps fn in a workflowWrapper, that can be passed to temporal Worker:
mytest := tempo.NewTestWithInputAndOutput(func(*T, string) string) w.RegisterWorkflowWithOptions(mytest.Function(), workflow.RegisterOptions{ Name: mytest.Name(), })
func NewTestWithOutput ¶
NewTestWithOutput wraps fn in a workflowWrapper, that can be passed to temporal Worker:
mytest := tempo.NewTestWithOutput(func(*T) string) w.RegisterWorkflowWithOptions(mytest.Function(), workflow.RegisterOptions{ Name: mytest.Name(), })
type TestFailedError ¶
type TestFailedError struct {
// contains filtered or unexported fields
}
func (*TestFailedError) Error ¶
func (e *TestFailedError) Error() string
Source Files ¶
Click to show internal directories.
Click to hide internal directories.