Documentation ¶
Index ¶
- Variables
- func NewMemProvider() *memProvider
- func Register(name string, provider SessionsProvider)
- func Unregister(name string)
- type Manager
- type Session
- 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
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrSessionsProviderNotFound = errors.New("Session: Session provider not found") ErrKeyNotAvailable = errors.New("Session: not item found for key.") )
Functions ¶
func NewMemProvider ¶
func NewMemProvider() *memProvider
func Register ¶
func Register(name string, provider SessionsProvider)
Register makes a session provider available by the provided name. If a Register is called twice with the same name or if the driver is nil, it panics.
func Unregister ¶
func Unregister(name string)
Types ¶
type Session ¶
type Session struct { // Will message to publish if connect is closed unexpectedly Will *packets.PublishPacket // Retained publish message Retained *packets.PublishPacket // contains filtered or unexported fields }
func (*Session) CleanSession ¶
func (*Session) RemoveTopic ¶
func (*Session) RetainMessage ¶
func (this *Session) RetainMessage(msg *packets.PublishPacket) error
func (*Session) SetWillFlag ¶
Click to show internal directories.
Click to hide internal directories.