common

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Sep 13, 2021 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Event

type Event struct {
	EventType `bson:"event"`
	Node      string `bson:"node"`
	Client    string `bson:"client"`
	Topic     string `bson:"topic,omitempty"`
	Qos       uint8  `bson:"qos,omitempty"`
	Time      int64  `bson:"time"`
}

func NewEvent

func NewEvent(node, client string, tp EventType) Event

func (*Event) SubUnSub

func (e *Event) SubUnSub(topic string, qos uint8)

type EventType

type EventType int
const (
	Connect EventType
	Sub
	UnSub
	DisConnect
)

Jump to

Keyboard shortcuts

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