Back to godoc.org

Package clients

v0.3.2
Latest Go to latest

The latest major version is .

Published: Dec 10, 2019 | License: Apache-2.0 | Module: github.com/VolantMQ/volantmq

Index

type Config

type Config struct {
	configuration.MqttConfig
	TopicsMgr        topicsTypes.Provider
	Persist          vlpersistence.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

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

GetSubscriber ...

func (*Manager) LoadSession

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

LoadSession load persisted session. Invoked by persistence provider

func (*Manager) OnConnection

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

func (*Manager) Stop

func (m *Manager) Stop() error

Stop session manager. Stops any existing connections

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

Package Files

Documentation was rendered with GOOS=linux and GOARCH=amd64.

Jump to identifier

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to identifier