clients

package
v0.0.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 21, 2017 License: Apache-2.0 Imports: 22 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	TopicsMgr                     topicsTypes.Provider
	Persist                       persistence.Provider
	Systree                       systree.Provider
	OnReplaceAttempt              func(string, bool)
	NodeName                      string
	ConnectTimeout                int
	KeepAlive                     int
	MaxPacketSize                 uint32
	ReceiveMax                    uint16
	TopicAliasMaximum             uint16
	MaximumQoS                    packet.QosType
	AvailableRetain               bool
	AvailableWildcardSubscription bool
	AvailableSubscriptionID       bool
	AvailableSharedSubscription   bool
	OfflineQoS0                   bool
	AllowReplace                  bool
	ForceKeepAlive                bool
}

Config manager configuration

type Manager

type Manager struct {
	Config
	// contains filtered or unexported fields
}

Manager clients manager

func NewManager

func NewManager(c *Config) (*Manager, error)

NewManager create new clients manager

func (*Manager) NewSession

func (m *Manager) NewSession(config *StartConfig)

NewSession create new session with provided established connection This is god function. Might be try split it

func (*Manager) Shutdown

func (m *Manager) Shutdown() error

Shutdown clients manager gracefully shutdown by stopping all active sessions and persist states

type StartConfig

type StartConfig struct {
	Req  *packet.Connect
	Resp *packet.ConnAck
	Conn net.Conn
	Auth auth.SessionPermissions
}

StartConfig used to reconfigure session after connection is created

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL