waits

package
v0.9.4 Latest Latest
Warning

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

Go to latest
Published: Apr 27, 2018 License: AGPL-3.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const TypeMsg string = "msg"
View Source
const TypeNothing string = "nothing"

Variables

This section is empty.

Functions

func WaitFromEnvelope

func WaitFromEnvelope(envelope *utils.TypedEnvelope) (flows.Wait, error)

Types

type BaseWait added in v0.4.0

type BaseWait struct {
}

Base of all wait types

func (*BaseWait) Begin added in v0.4.0

func (w *BaseWait) Begin(run flows.FlowRun)

func (*BaseWait) HasTimedOut added in v0.4.0

func (w *BaseWait) HasTimedOut() bool

func (*BaseWait) Resume added in v0.4.0

func (w *BaseWait) Resume(run flows.FlowRun)

func (*BaseWait) ResumeByTimeOut added in v0.4.0

func (w *BaseWait) ResumeByTimeOut(run flows.FlowRun)

type MsgWait

type MsgWait struct {
	TimeoutWait
}

func NewMsgWait added in v0.4.0

func NewMsgWait(timeout *int) *MsgWait

func (*MsgWait) Begin

func (w *MsgWait) Begin(run flows.FlowRun, step flows.Step)

func (*MsgWait) CanResume added in v0.4.0

func (w *MsgWait) CanResume(callerEvents []flows.Event) bool

CanResume returns true for a message wait if a message has now been received

func (*MsgWait) ResumeByTimeOut added in v0.4.0

func (w *MsgWait) ResumeByTimeOut(run flows.FlowRun)

func (*MsgWait) Type

func (w *MsgWait) Type() string

type NothingWait added in v0.4.0

type NothingWait struct {
	BaseWait
}

func (*NothingWait) Begin added in v0.4.0

func (w *NothingWait) Begin(run flows.FlowRun, step flows.Step)

func (*NothingWait) CanResume added in v0.4.0

func (w *NothingWait) CanResume(callerEvents []flows.Event) bool

CanResume always returns true for a nothing wait because it's not waiting for anything

func (*NothingWait) Type added in v0.4.0

func (w *NothingWait) Type() string

type TimeoutWait added in v0.4.0

type TimeoutWait struct {
	BaseWait

	Timeout   *int       `json:"timeout,omitempty"`
	TimeoutOn *time.Time `json:"timeout_on,omitempty"`
}

Base of all wait types than can timeout

func (*TimeoutWait) Begin added in v0.4.0

func (w *TimeoutWait) Begin(run flows.FlowRun)

func (*TimeoutWait) HasTimedOut added in v0.4.0

func (w *TimeoutWait) HasTimedOut() bool

Jump to

Keyboard shortcuts

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