pkg

package
v0.0.0-...-da2e59c Latest Latest
Warning

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

Go to latest
Published: May 31, 2023 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Start

func Start(ctx context.Context, config Config) (wg *sync.WaitGroup, err error)

Types

type Config

type Config struct {
	KafkaBootstrap string
	KafkaTopic     string
	KafkaOffset    string
	KafkaGroupId   string

	FilterQuery string

	MqttBroker       string
	MqttUser         string //keycloak-client
	MqttPw           string //keycloak-secret
	MqttClientId     string
	MqttQos          uint8
	MqttTopicMapping string

	Debug bool
}

func LoadConfig

func LoadConfig(location string) (config Config, err error)

loads config from json in location and used environment variables (e.g ZookeeperUrl --> ZOOKEEPER_URL)

type Handler

type Handler struct {
	Publisher   *mqtt.Publisher
	Mappings    []lib.PathTopicMapping
	FilterQuery *gojq.Query
}

func NewHandler

func NewHandler(publisher *mqtt.Publisher, mappings []lib.PathTopicMappingString, FilterQuery *string) (handler Handler, err error)

Directories

Path Synopsis
lib

Jump to

Keyboard shortcuts

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