Documentation
¶
Overview ¶
Package config implements command-line flag parsing and fer devices configuration from JSON files.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Channel ¶
type Channel struct { Name string `json:"name"` Sockets []Socket `json:"sockets,omitempty"` Type string `json:"type,omitempty"` // Type is the type of a Socket (PUB/SUB/PUSH/PULL/...) Method string `json:"method,omitempty"` // Method to operate the socket (connect/bind) Address string `json:"address,omitempty"` // Address is the socket end-point SendBufSize int `json:"sndBufSize,omitempty"` RecvBufSize int `json:"rcvBufSize,omitempty"` RateLogging int `json:"rateLogging,omitempty"` }
Channel holds the configuration of a channel.
func (*Channel) UnmarshalJSON ¶
UnmarshalJSON implements the json.Unmarshaler interface.
type Config ¶
type Config struct { Options Options `json:"fairMQOptions"` ID string `json:"fer_id,omitempty"` Transport string `json:"fer_transport,omitempty"` // zeromq, nanomsg, chan Control string `json:"fer_control,omitempty"` }
Config holds the configuration of a Fer program.
type Device ¶
type Device struct { Doc string `json:"_______COMMENT:,omitempty"` ID string `json:"id,omitempty"` Key string `json:"key,omitempty"` Channels []Channel `json:"channels"` }
Device holds the configuration of a device.
func (*Device) UnmarshalJSON ¶
UnmarshalJSON implements the json.Unmarshaler interface.
type Options ¶
type Options struct {
Devices []Device `json:"devices"`
}
Options holds the configuration of a Fer MQ program.
func (*Options) UnmarshalJSON ¶
UnmarshalJSON implements the json.Unmarshaler interface.
type Socket ¶
type Socket struct { Type string `json:"type"` // Type is the type of a Socket (PUB/SUB/PUSH/PULL/...) Method string `json:"method"` // Method to operate the socket (connect/bind) Address string `json:"address"` // Address is the socket end-point SendBufSize int `json:"sndBufSize"` RecvBufSize int `json:"rcvBufSize"` RateLogging int `json:"rateLogging"` }
Socket holds the configuration of a socket.
func (*Socket) UnmarshalJSON ¶
UnmarshalJSON implements the json.Unmarshaler interface.
Click to show internal directories.
Click to hide internal directories.