clients

package
v0.1.3 Latest Latest
Warning

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

Go to latest
Published: Jul 3, 2018 License: Apache-2.0 Imports: 25 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.IFace
	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) GetSubscriber added in v0.1.0

func (m *Manager) GetSubscriber(id string) (vlsubscriber.IFace, error)

GetSubscriber ...

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) (err error)

OnConnection implements transport.Handler interface and handles incoming connection

func (*Manager) Shutdown

func (m *Manager) Shutdown() error

Shutdown gracefully by stopping all active sessions and persist states

type StartConfig

type StartConfig struct {
	Req  *mqttp.Connect
	Resp *mqttp.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