Documentation ¶
Overview ¶
Package kafka contains data types, interfaces, and methods related to Kafka that can be used to configure brokers, as well as consume/produce messages.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func SaramaConfigFromBrokerConfig ¶
func SaramaConfigFromBrokerConfig(cfg *BrokerConfiguration) (*sarama.Config, error)
SaramaConfigFromBrokerConfig returns a Config struct from broker.Configuration parameters
Types ¶
type BrokerConfiguration ¶
type BrokerConfiguration struct { // Viper does not unmarshall automagically to a slice. // Handling a string is easier and nicer than all the code required to do so Addresses string `mapstructure:"addresses" toml:"addresses"` SecurityProtocol string `mapstructure:"security_protocol" toml:"security_protocol"` CertPath string `mapstructure:"cert_path" toml:"cert_path"` SaslMechanism string `mapstructure:"sasl_mechanism" toml:"sasl_mechanism"` SaslUsername string `mapstructure:"sasl_username" toml:"sasl_username"` SaslPassword string `mapstructure:"sasl_password" toml:"sasl_password"` Topic string `mapstructure:"topic" toml:"topic"` Timeout time.Duration `mapstructure:"timeout" toml:"timeout"` Group string `mapstructure:"group" toml:"group"` ClientID string `mapstructure:"client_id" toml:"client_id"` Enabled bool `mapstructure:"enabled" toml:"enabled"` }
BrokerConfiguration represents configuration of a single-instance Kafka broker
type SCRAMClient ¶
type SCRAMClient struct { *scram.Client *scram.ClientConversation scram.HashGeneratorFcn }
SCRAMClient implementation for the SCRAM authentication
func (*SCRAMClient) Begin ¶
func (x *SCRAMClient) Begin(userName, password, authzID string) (err error)
Begin prepares the client for the SCRAM exchange
func (*SCRAMClient) Done ¶
func (x *SCRAMClient) Done() bool
Done should return true when the SCRAM conversation is over.
Click to show internal directories.
Click to hide internal directories.