clients

package
Version: v0.0.4 Latest Latest
Warning

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

Go to latest
Published: Apr 22, 2018 License: Apache-2.0 Imports: 24 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 {
	configuration.MqttConfig
	TopicsMgr        topicsTypes.Provider
	Persist          persistence.Provider
	Systree          systree.Provider
	OnReplaceAttempt func(string, bool)
	NodeName         string
}

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) LoadSession added in v0.0.4

func (m *Manager) LoadSession(context interface{}, id []byte, state *persistence.SessionState) error

LoadSession load persisted session. Invoked by persistence provider

func (*Manager) OnConnection added in v0.0.4

func (m *Manager) OnConnection(conn transport.Conn, authMngr *auth.Manager) error

OnConnection implements transport.Handler interface and handles incoming connection

func (*Manager) Publish added in v0.0.4

func (m *Manager) Publish(id string, p *packet.Publish)

func (*Manager) Shutdown

func (m *Manager) Shutdown() error

Shutdown gracefully by stopping all active sessions and persist states

type StartConfig

type StartConfig struct {
	Req  *packet.Connect
	Resp *packet.ConnAck
	Conn net.Conn
	Auth vlauth.Permissions
}

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