Versions in this module Expand all Collapse all v0 v0.0.1 Feb 6, 2022 Changes in this version + var ErrKeyNotAvailable = errors.New("Session: not item found for key.") + var ErrSessionsProviderNotFound = errors.New("Session: Session provider not found") + func NewMemProvider() *memProvider + func Register(name string, provider SessionsProvider) + func Unregister(name string) + type Manager struct + func NewManager(providerName string) (*Manager, error) + func (this *Manager) Close() error + func (this *Manager) Count() int + func (this *Manager) Del(id string) + func (this *Manager) Get(id string) (*Session, error) + func (this *Manager) New(id string) (*Session, error) + func (this *Manager) Save(id string) error + type Session struct + Retained *packets.PublishPacket + Will *packets.PublishPacket + func (this *Session) AddTopic(topic string, qos byte) error + func (this *Session) CleanSession() bool + func (this *Session) ID() string + func (this *Session) Init(msg *packets.ConnectPacket) error + func (this *Session) RemoveTopic(topic string) error + func (this *Session) RetainMessage(msg *packets.PublishPacket) error + func (this *Session) SetWillFlag(v bool) + func (this *Session) Topics() ([]string, []byte, error) + func (this *Session) Update(msg *packets.ConnectPacket) error + func (this *Session) WillFlag() bool + type SessionsProvider interface + Close func() error + Count func() int + Del func(id string) + Get func(id string) (*Session, error) + New func(id string) (*Session, error) + Save func(id string) error