kfk

package
v0.0.0-...-37d5b15 Latest Latest
Warning

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

Go to latest
Published: Mar 22, 2023 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	INT32_MAX = 2147483647 - 1000
)

Variables

This section is empty.

Functions

func DoInitConsumer

func DoInitConsumer(cfg *KafkaConfig) *kafka.Consumer

func DoInitProducer

func DoInitProducer(cfg *KafkaConfig) *kafka.Producer

Types

type KafkaConfig

type KafkaConfig struct {
	Topic            string `json:"topic"`
	Topic2           string `json:"topic2"`
	GroupId          string `json:"group.id"`
	BootstrapServers string `json:"bootstrap.servers"`
	SecurityProtocol string `json:"security.protocol"`
	SaslMechanism    string `json:"sasl.mechanism"`
	SaslUsername     string `json:"sasl.username"`
	SaslPassword     string `json:"sasl.password"`
}

func LoadJsonConfig

func LoadJsonConfig() *KafkaConfig

config should be a pointer to structure, if not, panic

Jump to

Keyboard shortcuts

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