Documentation
¶
Overview ¶
Package linkout contains the linkOut node implementation.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type LinkOutConfig ¶
type LinkOutConfig struct {
// Links are the ids of linkIn nodes that receive pushed messages
Links []string `json:"links"`
// Mode is "link" (push to linkIn nodes) or "return" (answer a linkCall)
Mode string `json:"mode"`
}
LinkOutConfig holds configuration for the linkOut node
func (*LinkOutConfig) UnmarshalJSON ¶
func (c *LinkOutConfig) UnmarshalJSON(b []byte) error
UnmarshalJSON accepts links as either an array of strings or a comma-separated string.
type LinkOutNode ¶
LinkOutNode pushes messages into linkIn nodes ("link" mode) or answers the pending linkCall that injected the message ("return" mode).
func NewLinkOutNode ¶
func NewLinkOutNode(node nodestore.NodeInterface, config *LinkOutConfig, host nodebase.NodeHost) *LinkOutNode
NewLinkOutNode creates a new linkOut node
func (*LinkOutNode) Execute ¶
func (n *LinkOutNode) Execute(ctx context.Context, input nodestore.MessageInterface) (nodestore.MessageInterface, error)
Execute pushes the message to every configured linkIn target (mode "link") or resolves the caller at the top of the link call stack (mode "return", consuming the message).