broker

package
v0.0.0-...-b3e13b0 Latest Latest
Warning

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

Go to latest
Published: Apr 29, 2020 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const (
	SubAckQos0    = 0x00
	SubAckQos1    = 0x01
	SubAckQos2    = 0x02
	SubAckFailure = 0x80
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Broker

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

func NewBroker

func NewBroker(config *Config) *Broker

func (*Broker) Start

func (b *Broker) Start()

func (*Broker) StartHttpListen

func (b *Broker) StartHttpListen()

func (*Broker) StartTCPListen

func (b *Broker) StartTCPListen()

func (*Broker) StartWsListener

func (b *Broker) StartWsListener()

type Client

type Client struct {
	Id string
	// contains filtered or unexported fields
}

func (*Client) Ping

func (c *Client) Ping(packet *packets.PingreqPacket)

func (*Client) Publish

func (c *Client) Publish(packet *packets.PublishPacket)

func (*Client) Subscribe

func (c *Client) Subscribe(packet *packets.SubscribePacket)

type Config

type Config struct {
	TcpPort int
	Routes  []*Route
}

type Route

type Route struct {
	IP   string
	Port int
}

Jump to

Keyboard shortcuts

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