Documentation ¶
Index ¶
Constants ¶
View Source
const NATSPort = "4222"
NATSPort for the NATS server
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Broker ¶
type Broker interface {
Subscribe(types.Controller, []string) error
}
Broker used to subscribe to NATS subjects
func NewBroker ¶
func NewBroker(config BrokerConfig) (Broker, error)
NewBroker loops until we are able to connect to the NATS server
type BrokerConfig ¶
type BrokerConfig struct { // Host is the NATS address, the port is hard-coded to 4222 Host string // ConnTimeout is the timeout for Dial on a connection. ConnTimeout time.Duration }
BrokerConfig high level config for the broker
Click to show internal directories.
Click to hide internal directories.