kafkaclient

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Dec 14, 2024 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Namespace = "blacklog_exporter"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	AutoCommit       bool     `json:"auto_commit"           koanf:"auto_commit"`
	AutoOffsetReset  string   `json:"auto_offset_reset"     koanf:"auto_offset_reset"`
	BootstrapServers []string `json:"bootstrap_servers"     koanf:"bootstrap_servers"`
	Debug            bool     `json:"debug"                 koanf:"debug"`
	GroupId          string   `json:"group_id"              koanf:"group_id"`
	SaslMechanisms   string   `json:"sasl_mechanisms"       koanf:"sasl_mechanisms"`
	SaslPassword     string   `json:"sasl_password"         koanf:"sasl_password"`
	SaslUsername     string   `json:"sasl_username"         koanf:"sasl_username"`
	SecurityProtocol string   `json:"security_protocol"     koanf:"security_protocol"`
	Topics           []string `json:"topics"                koanf:"topics"`
}

type KafkaClient

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

func NewKafkaClient

func NewKafkaClient(config Config, messageConfig message.Config, logger *zap.Logger) *KafkaClient

func (*KafkaClient) ConsumerInitialize

func (kc *KafkaClient) ConsumerInitialize() (*KafkaClient, error)

func (*KafkaClient) Dispose

func (kc *KafkaClient) Dispose()

func (*KafkaClient) StartBlackboxTest

func (kc *KafkaClient) StartBlackboxTest()

type LogEntry

type LogEntry struct {
	Timestamp string `json:"timestamp"`
	Hostname  string `json:"hostname"`
}

type Metrics

type Metrics struct {
	Latency prometheus.HistogramVec
}

func NewMetrics

func NewMetrics() Metrics

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL
JackTT - Gopher 🇻🇳