Documentation ¶
Overview ¶
Package kafka contains an implementation of Producer interface that can be used to produce (that is send) messages to properly configured Kafka broker.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Producer ¶
type Producer struct { Configuration conf.KafkaConfiguration Producer sarama.SyncProducer }
Producer is an implementation of Producer interface
func New ¶
func New(config *conf.ConfigStruct) (*Producer, error)
New constructs new implementation of Producer interface
func (*Producer) ProduceMessage ¶
func (producer *Producer) ProduceMessage(msg types.ProducerMessage) (partitionID int32, offset int64, err error)
ProduceMessage produces message to selected topic. That function returns partition ID and offset of new message or an error value in case of any problem on broker side.
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.