Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ConsumeKafka ¶
func ConsumeKafka(ctx context.Context, goroutines *sdk.GoRoutines, kafkaConfig KafkaConsumerConfig, messageType interface{}, processEventFunc ProcessEventFunc, logErrorFunc LogErrorFunc) error
ConsumeKafka consume CDS Event from a kafka topic
Types ¶
type KafkaConfig ¶
type KafkaConfig struct { Enabled bool `toml:"enabled" json:"-" default:"false" mapstructure:"enabled"` BrokerAddresses string `toml:"broker" json:"-" mapstructure:"broker"` User string `toml:"user" json:"-" mapstructure:"user"` Password string `toml:"password" json:"-" mapstructure:"password"` Version string `toml:"version" json:"-" mapstructure:"version"` Topic string `toml:"topic" json:"-" mapstructure:"topic"` MaxMessageByte int `toml:"maxMessageByte" json:"-" mapstructure:"maxMessageByte"` DisableTLS bool `toml:"disableTLS" json:"-" mapstructure:"disableTLS"` DisableSASL bool `toml:"disableSASL" json:"-" mapstructure:"disableSASL"` ClientID string `toml:"clientID" json:"-" mapstructure:"clientID"` }
KafkaConfig handles all config to connect to Kafka
type KafkaConsumerConfig ¶ added in v0.52.0
type KafkaConsumerConfig struct { KafkaConfig ConsumerGroup string `toml:"consumerGroup" json:"-" mapstructure:"consumerGroup"` InitialOffset *int64 `toml:"initialOffset" json:"-" mapstructure:"initialOffset"` }
type LogErrorFunc ¶ added in v0.52.0
type LogErrorFunc func(string, ...interface{})
type ProcessEventFunc ¶ added in v0.52.0
type ProcessEventFunc func(interface{}) error
type SaramaLoger ¶ added in v0.52.0
type SaramaLoger struct {
// contains filtered or unexported fields
}
func (*SaramaLoger) Print ¶ added in v0.52.0
func (s *SaramaLoger) Print(v ...interface{})
func (*SaramaLoger) Printf ¶ added in v0.52.0
func (s *SaramaLoger) Printf(format string, v ...interface{})
func (*SaramaLoger) Println ¶ added in v0.52.0
func (s *SaramaLoger) Println(v ...interface{})
Click to show internal directories.
Click to hide internal directories.