bridge

package
v0.0.0-...-6ea8860 Latest Latest
Warning

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

Go to latest
Published: Aug 23, 2019 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const (
	//Connect mqtt connect
	Connect = "connect"
	//Publish mqtt publish
	Publish = "publish"
	//Subscribe mqtt sub
	Subscribe = "subscribe"
	//Unsubscribe mqtt sub
	Unsubscribe = "unsubscribe"
	//Disconnect mqtt disconenct
	Disconnect = "disconnect"
)
View Source
const (
	//Kafka plugin name
	Kafka = "kafka"
)

Variables

This section is empty.

Functions

func InitKafka

func InitKafka() *kafka

Init init kafak client

Types

type BridgeMQ

type BridgeMQ interface {
	Publish(e *Elements) error
}

func NewBridgeMQ

func NewBridgeMQ(name string) BridgeMQ

type Elements

type Elements struct {
	ClientID  string `json:"clientid"`
	Username  string `json:"username"`
	Topic     string `json:"topic"`
	Payload   string `json:"payload"`
	Timestamp int64  `json:"ts"`
	Action    string `json:"action"`
}

Elements kafka publish elements

Jump to

Keyboard shortcuts

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