kafka

package
v2.0.0-alpha.6 Latest Latest
Warning

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

Go to latest
Published: Dec 14, 2022 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
	KafkaConfig KafkaConfig
	*output.DnstapOutput
	// contains filtered or unexported fields
}

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) 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
}

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