Documentation ¶
Index ¶
- Constants
- type BadgerProvider
- func (b *BadgerProvider) CheckForPacketIdReuse(clientID string, packetID uint16) (bool, error)
- func (b *BadgerProvider) FreePacketID(clientID string, packetID uint16) error
- func (b *BadgerProvider) GetMissedMessages(clientID string) ([]*packets.Publish, error)
- func (b *BadgerProvider) ReservePacketID(clientID string, packetID uint16) error
- func (b *BadgerProvider) SaveForOfflineDelivery(clientId string, publish *packets.Publish) error
- type Provider
- type RedisProvider
- func (r *RedisProvider) CheckForPacketIdReuse(clientID string, packetID uint16) (bool, error)
- func (r *RedisProvider) FreePacketID(clientID string, packetID uint16) error
- func (r *RedisProvider) GetMissedMessages(clientId string) ([]*packets.Publish, error)
- func (r *RedisProvider) ReservePacketID(clientID string, packetID uint16) error
- func (r *RedisProvider) SaveForOfflineDelivery(clientId string, publish *packets.Publish) error
Constants ¶
View Source
const (
PacketReserved byte = 1
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BadgerProvider ¶
type BadgerProvider struct {
// contains filtered or unexported fields
}
func (*BadgerProvider) CheckForPacketIdReuse ¶
func (b *BadgerProvider) CheckForPacketIdReuse(clientID string, packetID uint16) (bool, error)
func (*BadgerProvider) FreePacketID ¶
func (b *BadgerProvider) FreePacketID(clientID string, packetID uint16) error
func (*BadgerProvider) GetMissedMessages ¶
func (b *BadgerProvider) GetMissedMessages(clientID string) ([]*packets.Publish, error)
func (*BadgerProvider) ReservePacketID ¶
func (b *BadgerProvider) ReservePacketID(clientID string, packetID uint16) error
func (*BadgerProvider) SaveForOfflineDelivery ¶
func (b *BadgerProvider) SaveForOfflineDelivery(clientId string, publish *packets.Publish) error
type Provider ¶
type Provider interface { SaveForOfflineDelivery(clientId string, publish *packets.Publish) error GetMissedMessages(clientId string) ([]*packets.Publish, error) ReservePacketID(clientID string, packetID uint16) error FreePacketID(clientID string, packetID uint16) error CheckForPacketIdReuse(clientID string, packetID uint16) (bool, error) }
func NewBadgerProvider ¶
type RedisProvider ¶
type RedisProvider struct {
// contains filtered or unexported fields
}
func (*RedisProvider) CheckForPacketIdReuse ¶
func (r *RedisProvider) CheckForPacketIdReuse(clientID string, packetID uint16) (bool, error)
func (*RedisProvider) FreePacketID ¶
func (r *RedisProvider) FreePacketID(clientID string, packetID uint16) error
func (*RedisProvider) GetMissedMessages ¶
func (r *RedisProvider) GetMissedMessages(clientId string) ([]*packets.Publish, error)
func (*RedisProvider) ReservePacketID ¶
func (r *RedisProvider) ReservePacketID(clientID string, packetID uint16) error
func (*RedisProvider) SaveForOfflineDelivery ¶
func (r *RedisProvider) SaveForOfflineDelivery(clientId string, publish *packets.Publish) error
Click to show internal directories.
Click to hide internal directories.