bridge

package
v0.0.0-...-4f2055d Latest Latest
Warning

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

Go to latest
Published: Feb 13, 2022 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Kafka = "kafka"
)

Variables

This section is empty.

Functions

func InitKafka

func InitKafka() *kafka

Init init kafak client

Types

type BridgeMQ

type BridgeMQ interface {
	Load(objs map[string]string)
	AddOrUpdateObj(key string, value string)
	RemoveObj(key string)
	GetObj(key string) (string, bool)
	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   interface{} `json:"payload"`
	Timestamp int64       `json:"ts"`
}

Elements kafka publish elements

Jump to

Keyboard shortcuts

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