Documentation ¶
Index ¶
- Constants
- Variables
- type BrokerStats
- type Client
- func (c *Client) Connected() bool
- func (c *Client) HandleFlow(msg ControlPacket, hrotti *Hrotti)
- func (c *Client) KeepAliveTimer(hrotti *Hrotti)
- func (c *Client) Receive(hrotti *Hrotti)
- func (c *Client) ResetTimer()
- func (c *Client) Send(hrotti *Hrotti)
- func (c *Client) Start(cp *ConnectPacket, hrotti *Hrotti)
- func (c *Client) Stop(sendWill bool, hrotti *Hrotti)
- func (c *Client) StopForTakeover()
- type Hrotti
- func (h *Hrotti) AddListener(name string, config *ListenerConfig) error
- func (h *Hrotti) AddSub(client string, subscription string, qos byte)
- func (h *Hrotti) AddSubscription(c *Client, topics []string, qoss []byte) []byte
- func (h *Hrotti) DeleteSub(client string, subscription string)
- func (h *Hrotti) DeleteSubAll(client string)
- func (h *Hrotti) DeliverMessage(topic string, message *PublishPacket)
- func (h *Hrotti) FindRetained(id string, topic string, qos byte)
- func (h *Hrotti) InitClient(conn net.Conn)
- func (h *Hrotti) RemoveSubscription(c *Client, topic string) bool
- func (h *Hrotti) Stop()
- func (h *Hrotti) StopListener(name string) error
- type ListenerConfig
- type MemoryPersistence
- func (p *MemoryPersistence) Add(client string, direction dirFlag, message ControlPacket) bool
- func (p *MemoryPersistence) AddBatch(batch map[string]*PublishPacket)
- func (p *MemoryPersistence) Close(client string)
- func (p *MemoryPersistence) Delete(client string, direction dirFlag, uid uuid.UUID) bool
- func (p *MemoryPersistence) Exists(client string) bool
- func (p *MemoryPersistence) GetAll(client string) (messages []ControlPacket)
- func (p *MemoryPersistence) Init() error
- func (p *MemoryPersistence) Open(client string)
- func (p *MemoryPersistence) Replace(client string, direction dirFlag, message ControlPacket) bool
- type MemoryPersistenceEntry
- type Persistence
- type State
- type StateVal
Constants ¶
View Source
const ( INBOUND = 1 OUTBOUND = 2 )
Variables ¶
loggers
Functions ¶
This section is empty.
Types ¶
type BrokerStats ¶
type BrokerStats struct {
// contains filtered or unexported fields
}
func (*BrokerStats) AddClient ¶
func (b *BrokerStats) AddClient()
type Client ¶
func (*Client) HandleFlow ¶
func (*Client) KeepAliveTimer ¶
func (*Client) ResetTimer ¶
func (c *Client) ResetTimer()
func (*Client) StopForTakeover ¶
func (c *Client) StopForTakeover()
type Hrotti ¶
type Hrotti struct { PersistStore Persistence // contains filtered or unexported fields }
func NewHrotti ¶
func NewHrotti(maxQueueDepth int, persistence Persistence) *Hrotti
func (*Hrotti) AddListener ¶
func (h *Hrotti) AddListener(name string, config *ListenerConfig) error
func (*Hrotti) AddSubscription ¶
Add a subscription for a client, taking an array of topics to subscribe to and an associated slice of QoS values for the topics, return a slice of byte values indicating the granted QoS values in topics order.
func (*Hrotti) DeleteSubAll ¶
func (*Hrotti) DeliverMessage ¶
func (*Hrotti) InitClient ¶
func (*Hrotti) RemoveSubscription ¶
func (*Hrotti) StopListener ¶
type ListenerConfig ¶
ListenerConfig is a struct containing a URL
func NewListenerConfig ¶
func NewListenerConfig(rawURL string) *ListenerConfig
NewListenerConfig returns a pointer to a ListenerConfig prepared to listen on the URL specified as rawURL
type MemoryPersistence ¶
the MemoryPersistence struct is a map of client pointers to pointers to a Persistence Entry. So each client has its own map of msgIds/packets.
func (*MemoryPersistence) Add ¶
func (p *MemoryPersistence) Add(client string, direction dirFlag, message ControlPacket) bool
func (*MemoryPersistence) AddBatch ¶
func (p *MemoryPersistence) AddBatch(batch map[string]*PublishPacket)
func (*MemoryPersistence) Close ¶
func (p *MemoryPersistence) Close(client string)
func (*MemoryPersistence) Delete ¶
func (p *MemoryPersistence) Delete(client string, direction dirFlag, uid uuid.UUID) bool
func (*MemoryPersistence) Exists ¶
func (p *MemoryPersistence) Exists(client string) bool
func (*MemoryPersistence) GetAll ¶
func (p *MemoryPersistence) GetAll(client string) (messages []ControlPacket)
func (*MemoryPersistence) Init ¶
func (p *MemoryPersistence) Init() error
func (*MemoryPersistence) Open ¶
func (p *MemoryPersistence) Open(client string)
func (*MemoryPersistence) Replace ¶
func (p *MemoryPersistence) Replace(client string, direction dirFlag, message ControlPacket) bool
type MemoryPersistenceEntry ¶
a persistence entry is a map of msgIds and ControlPackets
type Persistence ¶
Click to show internal directories.
Click to hide internal directories.