session

package
v0.0.0-...-fc90c2c Latest Latest
Warning

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

Go to latest
Published: Oct 19, 2020 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Repository

type Repository struct {
	Sessions map[string]Session
	Mu       sync.RWMutex
}

func NewRepository

func NewRepository() *Repository

NewRepository creates a new SessionRepo.

func (*Repository) Session

func (r *Repository) Session(clientID string) (Session, bool)

type Session

type Session struct {
	ID string
	// contains filtered or unexported fields
}

Session represents MQTT Proxy session between client and broker.

func New

func New(client client.Client, conn net.Conn, keepalive uint16, lwt *packets.PublishPacket, repo *Repository, logger *zap.Logger) Session

New creates a new Session.

func (*Session) ReadLoop

func (s *Session) ReadLoop()

Jump to

Keyboard shortcuts

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