Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // Ready states that pipe can be started. Ready ready // Running states that pipe is executing at the moment and can be paused. Running running // Paused states that pipe is paused and can be resumed. Paused paused )
states variables
View Source
var ( // ErrInvalidState is returned if pipe method cannot be executed at this moment. ErrInvalidState = fmt.Errorf("invalid state") )
Functions ¶
Types ¶
type Handle ¶
type Handle struct {
// contains filtered or unexported fields
}
Handle manages the lifecycle of the pipe.
func NewHandle ¶
func NewHandle(start StartFunc, newMessage NewMessageFunc, pushParams PushParamsFunc) *Handle
NewHandle returns new initalized handle that can be used to manage lifecycle.
type NewMessageFunc ¶
type NewMessageFunc func(pipeID string)
NewMessageFunc is the closure to send a message into a pipe.
type Params ¶
type Params map[string][]func()
Params represent a set of parameters mapped to ID of their receivers.
type PushParamsFunc ¶
type PushParamsFunc func(params Params)
PushParamsFunc is the closure to push new params into pipe.
Click to show internal directories.
Click to hide internal directories.