kafka

package
v2.2.1 Latest Latest
Warning

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

Go to latest
Published: Jan 31, 2024 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Setup

func Setup(bs json.RawMessage) (types.OutputPlugin, error)

Types

type Kafka

type Kafka struct {
	plugin.PluginCommon
	// kafka config
	KafkaConfig KafkaConfig
	*output.DnstapOutput
	// contains filtered or unexported fields
}

The kafka plugin outputs messages to the kafka server.

func (*Kafka) Close

func (o *Kafka) Close()

func (*Kafka) GetEncoder

func (o *Kafka) GetEncoder(v interface{}, codec *goavro.Codec, schemaID []byte) (sarama.Encoder, error)

func (*Kafka) Open

func (o *Kafka) Open() error

func (*Kafka) SetOutputContext

func (f *Kafka) SetOutputContext(oc *types.OutputContext)

func (*Kafka) Write

func (o *Kafka) Write(dm *types.DnstapMessage) error

type KafkaClient

type KafkaClient interface {
	Add(string, string, []byte, []byte) error
}

type KafkaConfig

type KafkaConfig struct {
	Hosts            []string
	SchemaRegistries []string
	Retry            uint
	Topic            string
	Key              string
	OutputType       OutputType
}

kafka config

type OutputType

type OutputType string
var (
	OutputTypeJSON     OutputType = "json"
	OutputTypePtoroBuf OutputType = "protobuf"
	OutputTypeAvero    OutputType = "avero"
)

Jump to

Keyboard shortcuts

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