waits

package
v0.28.12 Latest Latest
Warning

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

Go to latest
Published: Feb 22, 2019 License: AGPL-3.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const TypeMsg string = "msg"

TypeMsg is the type of our message wait

Variables

This section is empty.

Functions

func ReadWait added in v0.11.0

func ReadWait(data json.RawMessage) (flows.Wait, error)

ReadWait reads a wait from the given JSON

func RegisterType added in v0.11.0

func RegisterType(name string, f readFunc)

RegisterType registers a new type of wait

Types

type MsgWait

type MsgWait struct {
	// contains filtered or unexported fields
}

MsgWait is a wait which waits for an incoming message (i.e. a msg_received event)

func NewMsgWait added in v0.4.0

func NewMsgWait(timeout *int, hint flows.Hint) *MsgWait

NewMsgWait creates a new message wait

func (*MsgWait) Begin

func (w *MsgWait) Begin(run flows.FlowRun, log flows.EventCallback) bool

Begin beings waiting at this wait

func (*MsgWait) End

func (w *MsgWait) End(resume flows.Resume, node flows.Node) error

End ends this wait or returns an error

func (*MsgWait) Hint added in v0.24.0

func (w *MsgWait) Hint() flows.Hint

Hint returns the hint (optional)

func (*MsgWait) MarshalJSON added in v0.24.0

func (w *MsgWait) MarshalJSON() ([]byte, error)

MarshalJSON marshals this wait into JSON

func (*MsgWait) Timeout

func (w *MsgWait) Timeout() *int

Timeout returns the timeout of this wait in seconds or nil if no timeout is set

func (*MsgWait) TimeoutOn added in v0.9.10

func (w *MsgWait) TimeoutOn() *time.Time

TimeoutOn returns when this wait times out

func (*MsgWait) Type

func (w *MsgWait) Type() string

Type returns the type of this wait

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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