kafka

package
v2.7.3 Latest Latest
Warning

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

Go to latest
Published: Mar 26, 2024 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Overview

Package kafka implements a kafka proxy for MQTT requests.

Index

Constants

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

Variables

This section is empty.

Functions

This section is empty.

Types

type KVMap

type KVMap struct {
	TopicKey   string `json:"topicKey" jsonschema:"required"`
	HeaderKey  string `json:"headerKey" jsonschema:"required"`
	PayloadKey string `json:"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 a kafka proxy for MQTT requests.

func (*Kafka) Close

func (k *Kafka) Close()

Close close Kafka

func (*Kafka) Handle

func (k *Kafka) Handle(ctx *context.Context) string

Handle handles context

func (*Kafka) Inherit

func (k *Kafka) Inherit(previousGeneration filters.Filter)

Inherit init Kafka based on previous generation

func (*Kafka) Init

func (k *Kafka) Init()

Init init Kafka

func (*Kafka) Kind

func (k *Kafka) Kind() *filters.Kind

Kind return kind of Kafka

func (*Kafka) Name

func (k *Kafka) Name() string

Name returns the name of the Kafka filter instance.

func (*Kafka) Spec

func (k *Kafka) Spec() filters.Spec

Spec returns the spec used by the Kafka

func (*Kafka) Status

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

Status return status of Kafka

type Spec

type Spec struct {
	filters.BaseSpec `json:",inline"`

	Backend []string `json:"backend" jsonschema:"required,uniqueItems=true"`
	Topic   *Topic   `json:"topic" jsonschema:"required"`
	KVMap   *KVMap   `json:"mqtt" jsonschema:"required"`
}

Spec is spec of Kafka

type Topic

type Topic struct {
	Default string `json:"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