workflow

package
v0.0.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 9, 2022 License: MIT Imports: 4 Imported by: 30

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Canceled = sync.Canceled
View Source
var DefaultActivityOptions = internal.DefaultActivityOptions
View Source
var DefaultRetryOptions = internal.DefaultRetryOptions
View Source
var DefaultSubWorkflowOptions = internal.DefaultSubWorkflowOptions

Functions

func Go

func Go(ctx Context, f func(ctx Context))

func Now

func Now(ctx Context) time.Time

func Replaying

func Replaying(ctx Context) bool

func Select

func Select(ctx Context, cases ...SelectCase)

func Sleep

func Sleep(ctx Context, d time.Duration) error

func WithCancel

func WithCancel(parent Context) (ctx Context, cancel CancelFunc)

WithCancel returns a copy of parent with a new Done channel. The returned context's Done channel is closed when the returned cancel function is called or when the parent context's Done channel is closed, whichever happens first.

Canceling this context releases resources associated with it, so code should call cancel as soon as the operations running in this Context complete.

Types

type Activity

type Activity = internal.Activity

type ActivityOptions

type ActivityOptions = internal.ActivityOptions

type CancelFunc

type CancelFunc = sync.CancelFunc

type Channel

type Channel = sync.Channel

func NewBufferedChannel

func NewBufferedChannel(size int) Channel

func NewChannel

func NewChannel() Channel

func NewSignalChannel

func NewSignalChannel(ctx Context, name string) Channel

type Context

type Context = sync.Context

func NewDisconnectedContext

func NewDisconnectedContext(ctx Context) Context

type Future

type Future = sync.Future

func CreateSubWorkflowInstance

func CreateSubWorkflowInstance(ctx Context, options SubWorkflowOptions, workflow Workflow, args ...interface{}) Future

func ExecuteActivity

func ExecuteActivity(ctx Context, options ActivityOptions, activity Activity, args ...interface{}) Future

ExecuteActivity schedules the given activity to be executed

func ScheduleTimer

func ScheduleTimer(ctx Context, delay time.Duration) Future

func SideEffect

func SideEffect(ctx Context, f func(ctx Context) interface{}) Future

type Instance

type Instance = core.WorkflowInstance

func WorkflowInstance2

func WorkflowInstance2(ctx Context) Instance

TODO: Rename

type RetryOptions

type RetryOptions = internal.RetryOptions

type SelectCase

type SelectCase = sync.SelectCase

func Await

func Await(f Future, handler func(Context, Future)) SelectCase

func Default

func Default(handler func(Context)) SelectCase

func Receive

func Receive(c Channel, handler func(Context, Channel)) SelectCase

type SubWorkflowOptions

type SubWorkflowOptions = internal.SubWorkflowOptions

type Workflow

type Workflow = internal.Workflow

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL