Versions in this module Expand all Collapse all v0 v0.0.1 Feb 6, 2022 Changes in this version + const ACCEPT_MAX_SLEEP + const ACCEPT_MIN_SLEEP + const BrokerInfoTopic + const CLIENT + const CLUSTER + const CONNACK + const CONNECT + const Connected + const DEFAULT_ROUTE_CONNECT + const DEFAULT_TLS_TIMEOUT + const DISCONNECT + const Disconnected + const MessagePoolMessageNum + const MessagePoolNum + const PINGREQ + const PINGRESP + const PUB + const PUBACK + const PUBCOMP + const PUBLISH + const PUBREC + const PUBREL + const QosAtLeastOnce + const QosAtMostOnce + const QosExactlyOnce + const QosFailure + const REMOTE + const ROUTER + const SUB + const SUBACK + const SUBSCRIBE + const UNSUBACK + const UNSUBSCRIBE + var DisconnectedPacket = packets.NewControlPacket(packets.Disconnect).(*packets.DisconnectPacket) + func GenUniqueId() string + func InitHTTPMoniter(b *Broker) + func NewInfo(sid, url string, isforword bool) *packets.PublishPacket + func NewTLSConfig(tlsInfo TLSInfo) (*tls.Config, error) + func ProcessMessage(msg *Message) + type Broker struct + func NewBroker(config *Config) (*Broker, error) + func (b *Broker) BroadcastInfoMessage(remoteID string, msg *packets.PublishPacket) + func (b *Broker) BroadcastSubOrUnsubMessage(packet packets.ControlPacket) + func (b *Broker) BroadcastUnSubscribe(subs map[string]*subscription) + func (b *Broker) CheckConnectAuth(clientID, username, password string) bool + func (b *Broker) CheckRemoteExist(remoteID, url string) bool + func (b *Broker) CheckTopicAuth(action, clientID, username, ip, topic string) bool + func (b *Broker) ConnectToDiscovery() + func (b *Broker) OnlineOfflineNotification(clientID string, online bool) + func (b *Broker) Publish(e *bridge.Elements) + func (b *Broker) PublishMessage(packet *packets.PublishPacket) + func (b *Broker) SendLocalSubsToRouter(c *client) + func (b *Broker) SetAuth(customAuth auth.Auth) + func (b *Broker) SetOnlineOfflineHook(hook OnlineOfflineHook) + func (b *Broker) SetPublishHook(hook PublishHook) + func (b *Broker) Start() + func (b *Broker) StartClientListening(Tls bool) + func (b *Broker) StartClusterListening() + func (b *Broker) StartWebsocketListening() + func (b *Broker) SubmitWork(clientId string, msg *Message) + type Config struct + Cluster RouteInfo + Debug bool + HTTPPort string + Host string + Plugin Plugins + Port string + Router string + TlsHost string + TlsInfo TLSInfo + TlsPort string + Worker int + WsPath string + WsPort string + WsTLS bool + var DefaultConfig *Config = &Config{ ... } + func ConfigureConfig(args []string) (*Config, error) + func LoadConfig(filename string) (*Config, error) + type InflightStatus uint8 + const Publish + const Pubrel + type Message struct + type NamedPlugins struct + Auth string + Bridge string + type OnlineOfflineHook func(string, bool) + type Plugins struct + Auth auth.Auth + Bridge bridge.BridgeMQ + func (p *Plugins) UnmarshalJSON(b []byte) error + type PublishHook func(string, *packets.PublishPacket) + type RouteInfo struct + Host string + Port string + type TLSInfo struct + CaFile string + CertFile string + KeyFile string + Verify bool