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 Channel
- type Option
- type Plan
- type Registry
- type Runner
- type T
- func (t *T) BufferedChannel(size int) *Channel
- 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
- type Workflow
Constants ¶
View Source
const TestFailedErrorType = "TestFailedError"
Variables ¶
View Source
var ( ErrSetLimitWithGoroutines = errors.New("set limit with goroutines") ErrWorkflowExecute = errors.New("workflow execute") ErrWorkflowResult = errors.New("workflow result") ErrTaskExecute = errors.New("task execute") ErrTaskResult = errors.New("task result") ErrPlanRun = errors.New("plan run") )
View Source
var DefaultActivityOptions = workflow.ActivityOptions{ StartToCloseTimeout: time.Minute, RetryPolicy: &temporal.RetryPolicy{ MaximumAttempts: 1, }, }
Functions ¶
func NewTestFailedError ¶
Types ¶
type Channel ¶ added in v0.3.0
type Channel struct {
// contains filtered or unexported fields
}
Channel is a wrapper for Temporal Channel
type Option ¶ added in v0.2.0
type Option func(*runConfig)
func WithReportHandler ¶ added in v0.2.0
func WithReporting ¶ added in v0.2.0
type Runner ¶
type Runner struct {
// contains filtered or unexported fields
}
func (*Runner) SetReporting ¶ added in v0.2.0
func (*Runner) SetResultHandler ¶ added in v0.2.0
type T ¶
type T struct {
// contains filtered or unexported fields
}
func (*T) BufferedChannel ¶ added in v0.3.0
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.

