Documentation ¶
Index ¶
Constants ¶
View Source
const ( SaslTypePlain = "PLAIN" SaslTypeScram = "SCRAM" SaslScramAlgorithmSha256 = "SCRAM-SHA-256" SaslScramAlgorithmSha512 = "SCRAM-SHA-512" )
Variables ¶
This section is empty.
Functions ¶
func RegisterKafkaConfig ¶
func RegisterKafkaConfig(config *KafkaConfig)
Types ¶
type KafkaConfig ¶
type KafkaConfig struct { Producer map[string]*KafkaProducer Consumer map[string]*KafkaConsumer }
type KafkaConsumer ¶
type KafkaConsumer struct { Key string `json:"key"` Address []string `json:"address"` // kafka地址 Group string `json:"group"` // groupId Topic string `json:"topic"` Partition int `json:"partition"` Offset int64 `json:"offset"` SaslConfig *SaslConfig TlsConfig *TlsConfig // contains filtered or unexported fields }
func GetConsumer ¶
func GetConsumer(key string) *KafkaConsumer
type KafkaProducer ¶
type KafkaProducer struct { Address []string Topic string Async bool Ack int CompressCodec string SaslConfig *SaslConfig TlsConfig *TlsConfig // contains filtered or unexported fields }
func GetProducer ¶
func GetProducer(key string) *KafkaProducer
type SaslConfig ¶
Click to show internal directories.
Click to hide internal directories.