Documentation
¶
Overview ¶
gateway connects Broker-Device
Index ¶
Constants ¶
View Source
const ( DefaultMaxRetryCount = 3 DefaultRetryInterval = 3 // sec MaxMsgChanBufferSize = 20 MaxBrokerChanBufferSize = 20 MaxDevicChanBufferSize = 20 )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Gateway ¶
type Gateway struct {
Name string `validate:"max=256,regexp=[^/]+,validtopic"`
Devices []device.Devicer
Brokers broker.Brokers
MsgChan chan message.Message // Broker -> GW
BrokerChan chan message.Message // GW -> Broker
CmdChan chan string // somewhere -> GW
DeviceChan chan message.Message // GW -> device
MaxRetryCount int `validate:"min=1"`
RetryInterval int `validate:"min=1"`
}
func NewGateway ¶
NewGateway returns Gateway instance with config object
Click to show internal directories.
Click to hide internal directories.