listener

package
v2.2.3 Latest Latest
Warning

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

Go to latest
Published: Sep 14, 2021 License: Apache-2.0 Imports: 7 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 {
	Listeners []Listener `yaml:"listeners" json:"listeners"`
}

Config listener config

type Handler

type Handler interface {
	Handle(conn mqtt.Connection, anonymous bool)
}

Handler listener handler

type Listener

type Listener struct {
	Address              string     `yaml:"address" json:"address"`
	MaxMessageSize       utils.Size `yaml:"maxMessageSize" json:"maxMessageSize"`
	MaxConcurrentStreams uint32     `yaml:"maxConcurrentStreams" json:"maxConcurrentStreams"`
	Anonymous            bool       `yaml:"anonymous" json:"anonymous"`
	utils.Certificate    `yaml:",inline" json:",inline"`
}

Listener listener config

type Manager

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

Manager listener manager

func NewManager

func NewManager(cfg []Listener, handler Handler) (*Manager, error)

NewManager creates a new listener manager

func (*Manager) Close

func (m *Manager) Close() error

Close closes listener

Jump to

Keyboard shortcuts

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