Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrOverflow = errors.New("session: overflow") ErrPersistence = errors.New("session: error during persistence restore") )
nolint: golint
Functions ¶
This section is empty.
Types ¶
type Callbacks ¶
type Callbacks struct { // OnStop called when session stopped net connection and should be either suspended or deleted OnStop func(string, bool) }
Callbacks provided by sessions manager to signal session state
type Config ¶
type Config struct { ID string Username string State *persistenceTypes.SessionMessages Subscriber subscriber.ConnectionProvider Auth auth.SessionPermissions Messenger types.TopicMessenger Metric systree.Metric Conn net.Conn OnDisconnect onDisconnect ExpireIn *time.Duration WillDelay time.Duration KeepAlive uint16 SendQuota uint16 Clean bool PreserveOrder bool Version packet.ProtocolVersion }
Config is system wide configuration parameters for every session
type DisconnectParams ¶
type DisconnectParams struct { Will bool ExpireAt *time.Duration State *persistenceTypes.SessionMessages }
DisconnectParams session state when stopped
type Type ¶
type Type struct {
// contains filtered or unexported fields
}
Type session
func (*Type) Stop ¶
func (s *Type) Stop(reason packet.ReasonCode)
Stop session. Function assumed to be invoked once server about to either shutdown, disconnect or session is being replaced Effective only first invoke
Click to show internal directories.
Click to hide internal directories.