Documentation ¶
Index ¶
- func ReturnItem(i *Item)
- func ReturnItemQos12(i *Item)
- type Basic
- type Item
- type QoS12
- func (q *QoS12) Add(i *Item)
- func (q *QoS12) Init()
- func (q *QoS12) MonitorTimeouts(ctx context.Context, toS int64, d func(*Item) error, wg *sync.WaitGroup)
- func (q *QoS12) Remove(i *Item)
- func (q *QoS12) RemoveId(id uint16) *Item
- func (q *QoS12) ResendAll(d func(*Item) error) error
- func (q *QoS12) Reset()
- func (q *QoS12) StartDispatcher(ctx context.Context, d func(*Item) error, getPId func() uint16, ...)
- type QoS2Part2
- func (q *QoS2Part2) Add(i *Item)
- func (q *QoS2Part2) Init()
- func (q *QoS2Part2) MonitorTimeouts(ctx context.Context, toS int64, d func(*Item) error, wg *sync.WaitGroup)
- func (q *QoS2Part2) Present(id uint16) bool
- func (q *QoS2Part2) Remove(id uint16) *Item
- func (q *QoS2Part2) ResendAll(d func(*Item) error) error
- func (q *QoS2Part2) Reset()
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ReturnItem ¶
func ReturnItem(i *Item)
func ReturnItemQos12 ¶
func ReturnItemQos12(i *Item)
Types ¶
type Basic ¶
type Basic struct {
// contains filtered or unexported fields
}
Inbound PUBLISH messages to server, as well as outbound QoS 0 to clients.
func (*Basic) NotifyDispatcher ¶
func (q *Basic) NotifyDispatcher()
NotifyDispatcher will signal dispatcher to check the queue.
type Item ¶
type Item struct { Sent int64 // QoS 1&2, PUBREL P *model.PubMessage SId uint32 // Subscription Id. PUBLISH from Server to Client. PId uint16 // QoS 1&2, PUBREL TxQoS uint8 Retained bool // Msg sent to client due to subscription // contains filtered or unexported fields }
Item is stored in various publish message queues.
func GetItem ¶
func GetItem(p *model.PubMessage) (i *Item)
type QoS12 ¶
type QoS12 struct { Basic // contains filtered or unexported fields }
Outbound QoS 1 & 2 PUBLISH messages to clients.
func (*QoS12) MonitorTimeouts ¶
func (q *QoS12) MonitorTimeouts(ctx context.Context, toS int64, d func(*Item) error, wg *sync.WaitGroup)
Resend pending/unacknowledged QoS 1 & 2 PUBLISHs after timeout.
type QoS2Part2 ¶
type QoS2Part2 struct {
// contains filtered or unexported fields
}
Outbound PUBREL messages,
func (*QoS2Part2) MonitorTimeouts ¶
func (q *QoS2Part2) MonitorTimeouts(ctx context.Context, toS int64, d func(*Item) error, wg *sync.WaitGroup)
Resend pending/unacknowledged QoS 2 PUBRELs after timeout.
Click to show internal directories.
Click to hide internal directories.