config

package
v0.0.0-...-50c92f1 Latest Latest
Warning

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

Go to latest
Published: Oct 14, 2024 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ConnectProducer

func ConnectProducer(brokersUrl []string) (sarama.SyncProducer, error)

func GetKafkaConfig

func GetKafkaConfig(username, password string) *sarama.Config

func RetryKafkaConnection

func RetryKafkaConnection(brokers []string, maxRetries int, retryInterval time.Duration) (sarama.SyncProducer, error)

Retry logic for connecting to Kafka

func RetryKafkaConnectionMock

func RetryKafkaConnectionMock(brokers []string, maxRetries int, retryInterval time.Duration, dialFunc func([]string) (sarama.SyncProducer, error)) (sarama.SyncProducer, error)

Types

type Config

type Config interface {
	Get(key string) string
	Set(key, value string)
}

func New

func New(filenames ...string) Config

Jump to

Keyboard shortcuts

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