sessions

package
v1.9.4 Latest Latest
Warning

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

Go to latest
Published: Sep 5, 2020 License: MPL-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func PrefixMountPoint

func PrefixMountPoint(mountPoint string, t []byte) []byte

func TrimMountPoint

func TrimMountPoint(mountPoint string, t []byte) []byte

Types

type Session

type Session struct {
	ID         string
	ClientID   string
	MountPoint string
	Lwt        *packet.Publish

	Encoder      *encoder.Encoder
	Disconnected bool
	// contains filtered or unexported fields
}

func NewSession

func NewSession(c io.WriteCloser, stats encoder.StatRecorder) *Session

func (*Session) AddTopic

func (s *Session) AddTopic(t []byte)

func (*Session) Close

func (s *Session) Close() error

func (*Session) GetTopics

func (s *Session) GetTopics() [][]byte

func (*Session) ProcessConnect

func (s *Session) ProcessConnect(connect *packet.Connect) error

func (*Session) RemoveTopic

func (s *Session) RemoveTopic(t []byte)

func (*Session) Send

func (s *Session) Send(publish *packet.Publish) error

type Store

type Store interface {
	Get(id string) *Session
	Save(id string, session *Session)
	Delete(id string)
}

func NewStore

func NewStore() Store

Jump to

Keyboard shortcuts

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