Documentation
¶
Index ¶
- func CallActivity[T any, R any](ctx context.Context, activity types.Activity[T, R], input *T) awaitable.Awaitable[*R]
- func GetCurrentTimestamp(ctx context.Context) time.Time
- func GetVersion(ctx context.Context) string
- func GetWorkflowExecutionStartedTimestamp(ctx context.Context) time.Time
- func IsReplaying(ctx context.Context) bool
- func OnEvent(ctx context.Context, eventName string, callback func([]byte))
- func SetVar[T any](ctx context.Context, name string, value T)
- func WaitFor(ctx context.Context, delay time.Duration)
- func WaitUntil(ctx context.Context, until time.Time)
- type AwaitableActivity
- type AwaitableTimer
- type WorkflowInfo
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CallActivity ¶
func GetVersion ¶
func IsReplaying ¶ added in v0.0.5
Types ¶
type AwaitableActivity ¶
type AwaitableActivity[R any] struct { Activity any Promise *workflow.ActivityPromise }
func (*AwaitableActivity[R]) Await ¶
func (t *AwaitableActivity[R]) Await() (*R, error)
type AwaitableTimer ¶
type AwaitableTimer struct {
Promise *workflow.TimerPromise
}
func (*AwaitableTimer) Await ¶
func (t *AwaitableTimer) Await() (any, error)
type WorkflowInfo ¶ added in v0.0.5
type WorkflowInfo struct {
Version string
WorkflowExecutionStartedTimestamp time.Time
CurrentTimestamp time.Time
IsReplaying bool
}
func GetWorkflowInfo ¶ added in v0.0.5
func GetWorkflowInfo(ctx context.Context) *WorkflowInfo
Click to show internal directories.
Click to hide internal directories.