Documentation
¶
Overview ¶
Package udpout contains the udpOut node implementation.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type UDPOutConfig ¶
type UDPOutConfig struct {
// Host is the target host (default 127.0.0.1); overridden by
// message Metadata["ip"] when present.
Host string `json:"host"`
// Port is the target port; overridden by message
// Metadata["port"] when present.
Port int `json:"port"`
}
UDPOutConfig holds configuration for the udpOut node.
type UDPOutNode ¶
UDPOutNode sends the message Data as a UDP datagram to the configured host:port, or to the message's Metadata ip/port when present (e.g. answering a udpIn sender).
func NewUDPOutNode ¶
func NewUDPOutNode(node nodestore.NodeInterface, config *UDPOutConfig) *UDPOutNode
NewUDPOutNode creates a new udpOut node
func (*UDPOutNode) Execute ¶
func (n *UDPOutNode) Execute(ctx context.Context, input nodestore.MessageInterface) (nodestore.MessageInterface, error)
Execute resolves the target address (metadata wins) and sends one datagram; the input passes through unchanged.
func (*UDPOutNode) Validate ¶
func (n *UDPOutNode) Validate() error
Validate checks the udpOut node configuration