Documentation ¶
Overview ¶
Package subqueue is internal implementation of awsiotdev package. It implements offline queueing of MQTT subscription.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type OperationType ¶
type OperationType int32
OperationType represents type of the operation.
const ( // Subscribe requests a new subscription. Subscribe OperationType = iota // Unsubscribe requests stopping the subscription. Unsubscribe )
type Queue ¶
type Queue struct {
// contains filtered or unexported fields
}
Queue manages queued subscription operations.
func (*Queue) Enqueue ¶
func (s *Queue) Enqueue(d *Subscription)
Enqueue pushes a subscription operation to the queue.
func (*Queue) Pop ¶
func (s *Queue) Pop() *Subscription
Pop gets the oldest subscription operation in the queue and drops it.
type Subscription ¶
type Subscription struct { Type OperationType Topic string Cb mqtt.MessageHandler }
Subscription stores a request of subscription operation.
Click to show internal directories.
Click to hide internal directories.