kafkaacquisition

package
v1.7.3 Latest Latest
Warning

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

Go to latest
Published: Oct 24, 2025 License: MIT Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type KafkaBatchConfiguration added in v1.6.9

type KafkaBatchConfiguration struct {
	BatchMinBytes  int           `yaml:"min_bytes"`
	BatchMaxBytes  int           `yaml:"max_bytes"`
	BatchMaxWait   time.Duration `yaml:"max_wait"`
	BatchQueueSize int           `yaml:"queue_size"`
	CommitInterval time.Duration `yaml:"commit_interval"`
}

type KafkaConfiguration

type KafkaConfiguration struct {
	Brokers                           []string                `yaml:"brokers"`
	Topic                             string                  `yaml:"topic"`
	GroupID                           string                  `yaml:"group_id"`
	Partition                         int                     `yaml:"partition"`
	Timeout                           string                  `yaml:"timeout"`
	TLS                               *TLSConfig              `yaml:"tls"`
	BatchConfiguration                KafkaBatchConfiguration `yaml:"batch"`
	configuration.DataSourceCommonCfg `yaml:",inline"`
}

func (*KafkaConfiguration) NewDialer

func (kc *KafkaConfiguration) NewDialer() (*kafka.Dialer, error)

func (*KafkaConfiguration) NewReader

func (kc *KafkaConfiguration) NewReader(dialer *kafka.Dialer, logger *log.Entry) (*kafka.Reader, error)

func (*KafkaConfiguration) NewTLSConfig

func (kc *KafkaConfiguration) NewTLSConfig() (*tls.Config, error)

type KafkaSource

type KafkaSource struct {
	Config KafkaConfiguration

	Reader *kafka.Reader
	// contains filtered or unexported fields
}

func (*KafkaSource) CanRun

func (*KafkaSource) CanRun() error

func (*KafkaSource) Configure

func (k *KafkaSource) Configure(yamlConfig []byte, logger *log.Entry, metricsLevel metrics.AcquisitionMetricsLevel) error

func (*KafkaSource) Dump

func (k *KafkaSource) Dump() any

func (*KafkaSource) GetAggregMetrics

func (*KafkaSource) GetAggregMetrics() []prometheus.Collector

func (*KafkaSource) GetMetrics

func (*KafkaSource) GetMetrics() []prometheus.Collector

func (*KafkaSource) GetMode

func (k *KafkaSource) GetMode() string

func (*KafkaSource) GetName

func (*KafkaSource) GetName() string

func (*KafkaSource) GetUuid added in v1.5.0

func (k *KafkaSource) GetUuid() string

func (*KafkaSource) ReadMessage

func (k *KafkaSource) ReadMessage(ctx context.Context, out chan types.Event) error

func (*KafkaSource) RunReader

func (k *KafkaSource) RunReader(ctx context.Context, out chan types.Event, t *tomb.Tomb) error

func (*KafkaSource) StreamingAcquisition

func (k *KafkaSource) StreamingAcquisition(ctx context.Context, out chan types.Event, t *tomb.Tomb) error

func (*KafkaSource) UnmarshalConfig added in v1.5.0

func (k *KafkaSource) UnmarshalConfig(yamlConfig []byte) error

type TLSConfig

type TLSConfig struct {
	InsecureSkipVerify bool   `yaml:"insecure_skip_verify"`
	ClientCert         string `yaml:"client_cert"`
	ClientKey          string `yaml:"client_key"`
	CaCert             string `yaml:"ca_cert"`
}

Jump to

Keyboard shortcuts

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