Documentation ¶
Overview ¶
Package runtime implements environment for dataflow programs execution.
Index ¶
- Variables
- type BoolMsg
- type Connection
- type ConnectionMeta
- type Connector
- type EmptyListener
- type Event
- type EventListener
- type EventMessagePending
- type EventMessageReceived
- type EventMessageSent
- type EventType
- type FloatMsg
- type FuncCall
- type FuncCreator
- type FuncIO
- type FuncPorts
- type FuncRunner
- type IntMsg
- type ListMsg
- type MapMsg
- type Msg
- type PortAddr
- type Ports
- type Program
- type Runtime
- type StrMsg
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrStartPortNotFound = errors.New("start port not found") ErrExitPortNotFound = errors.New("stop port not found") ErrConnector = errors.New("connector") ErrFuncRunner = errors.New("func runner") )
View Source
var ErrNilDeps = errors.New("runtime deps nil")
View Source
var ErrSinglePortCount = errors.New("number of ports found by name not equals to one")
Functions ¶
This section is empty.
Types ¶
type BoolMsg ¶
type BoolMsg struct {
// contains filtered or unexported fields
}
func NewBoolMsg ¶
func (BoolMsg) MarshalJSON ¶ added in v0.20.0
type Connection ¶
type Connection struct { Sender chan Msg Receivers []chan Msg Meta ConnectionMeta }
type ConnectionMeta ¶
type Connector ¶
type Connector struct {
// contains filtered or unexported fields
}
func NewConnector ¶ added in v0.6.3
func NewConnector(lis EventListener) Connector
func NewDefaultConnector ¶
func NewDefaultConnector() Connector
type EmptyListener ¶
type EmptyListener struct{}
type Event ¶
type Event struct { Type EventType MessageSent *EventMessageSent MessagePending *EventMessagePending MessageReceived *EventMessageReceived }
type EventListener ¶
type EventMessagePending ¶
type EventMessagePending struct { Meta ConnectionMeta // We can use sender from here and receivers just as a handy metadata ReceiverPortAddr PortAddr // So what we really need is sender and receiver port addrs }
EventMessagePending describes event when message has reached receiver but not yet passed inside. It's usefull only for interception and modifying message for specific receiver.
func (EventMessagePending) String ¶
func (e EventMessagePending) String() string
type EventMessageReceived ¶
type EventMessageReceived struct { Meta ConnectionMeta // Same as with pending event ReceiverPortAddr PortAddr }
func (EventMessageReceived) String ¶
func (e EventMessageReceived) String() string
type EventMessageSent ¶
type EventMessageSent struct { SenderPortAddr PortAddr ReceiverPortAddrs map[PortAddr]struct{} // We use map to work with breakpoints }
func (EventMessageSent) String ¶
func (e EventMessageSent) String() string
type FloatMsg ¶
type FloatMsg struct {
// contains filtered or unexported fields
}
func NewFloatMsg ¶
func (FloatMsg) MarshalJSON ¶ added in v0.20.0
type FuncCreator ¶
type FuncPorts ¶
FuncPorts is data structure that runtime functions must use at startup to get needed ports. Its methods can return error because it's okay to fail at startup. Keys are port names and values are slots.
type FuncRunner ¶
type FuncRunner struct {
// contains filtered or unexported fields
}
func MustNewFuncRunner ¶
func MustNewFuncRunner(registry map[string]FuncCreator) FuncRunner
type IntMsg ¶
type IntMsg struct {
// contains filtered or unexported fields
}
func (IntMsg) MarshalJSON ¶ added in v0.20.0
type ListMsg ¶
type ListMsg struct {
// contains filtered or unexported fields
}
List
func NewListMsg ¶
func (ListMsg) MarshalJSON ¶ added in v0.20.0
type MapMsg ¶
type MapMsg struct {
// contains filtered or unexported fields
}
Map
func (MapMsg) MarshalJSON ¶ added in v0.20.0
type PortAddr ¶
type Program ¶
type Program struct { Ports Ports Connections []Connection Funcs []FuncCall }
type Runtime ¶
type Runtime struct {
// contains filtered or unexported fields
}
func New ¶
func New(connector Connector, funcRunner FuncRunner) Runtime
type StrMsg ¶
type StrMsg struct {
// contains filtered or unexported fields
}
func (StrMsg) MarshalJSON ¶ added in v0.20.0
Source Files ¶
Click to show internal directories.
Click to hide internal directories.