kafka

package
v1.5.3 Latest Latest
Warning

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

Go to latest
Published: Jun 28, 2022 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// Kind is the kind of Kafka
	Kind = "Kafka"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type KVMap

type KVMap struct {
	TopicKey   string `yaml:"topicKey" jsonschema:"required"`
	HeaderKey  string `yaml:"headerKey" jsonschema:"required"`
	PayloadKey string `yaml:"payloadKey" jsonschema:"required"`
}

KVMap defines ways to get kafka data from MQTTContext kv map

type Kafka

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

Kafka is kafka backend for MQTT proxy

func (*Kafka) Close

func (k *Kafka) Close()

Close close Kafka

func (*Kafka) DefaultSpec

func (k *Kafka) DefaultSpec() interface{}

DefaultSpec return default spec of Kafka

func (*Kafka) Description

func (k *Kafka) Description() string

Description return description of Kafka

func (*Kafka) HandleMQTT

func (k *Kafka) HandleMQTT(ctx context.MQTTContext) *context.MQTTResult

HandleMQTT handle MQTT context

func (*Kafka) Inherit

func (k *Kafka) Inherit(filterSpec *pipeline.FilterSpec, previousGeneration pipeline.Filter)

Inherit init Kafka based on previous generation

func (*Kafka) Init

func (k *Kafka) Init(filterSpec *pipeline.FilterSpec)

Init init Kafka

func (*Kafka) Kind

func (k *Kafka) Kind() string

Kind return kind of Kafka

func (*Kafka) Results

func (k *Kafka) Results() []string

Results return possible results of Kafka

func (*Kafka) Status

func (k *Kafka) Status() interface{}

Status return status of Kafka

type Spec

type Spec struct {
	Backend []string `yaml:"backend" jsonschema:"required,uniqueItems=true"`
	Topic   *Topic   `yaml:"topic" jsonschema:"required"`
	KVMap   *KVMap   `yaml:"mqtt" jsonschema:"required"`
}

Spec is spec of Kafka

type Topic

type Topic struct {
	Default string `yaml:"default" jsonschema:"required"`
}

Topic defined ways to get Kafka topic

Jump to

Keyboard shortcuts

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