kafka

package
v0.0.6-beta1 Latest Latest
Warning

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

Go to latest
Published: Jul 23, 2023 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	MessagesSent = promauto.NewCounter(prometheus.CounterOpts{
		Name: "kafka_messages_sent_total",
		Help: "The total number of messages sent",
	})
	SendErrors = promauto.NewCounter(prometheus.CounterOpts{
		Name: "kafka_send_errors_total",
		Help: "The total number of send errors",
	})
)

Initialize Prometheus metrics

Functions

func Shutdown

func Shutdown()

func WriteToKafka

func WriteToKafka(event events.Event) error

WriteToKafka writes the event to Kafka

Types

type KafkaWriter

type KafkaWriter interface {
	WriteMessages(context.Context, ...kafka.Message) error
	Close() error
}

KafkaWriter is an interface that allows for writing messages to Kafka

Jump to

Keyboard shortcuts

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