Versions in this module Expand all Collapse all v0 v0.0.2 Jun 9, 2023 v0.0.1 Jun 6, 2023 Changes in this version + func InitLogger(log logger.Logger) + func ToProducerMessage(message *ProducerMessage) (msg *sarama.ProducerMessage) + type ConsumerMessage struct + BlockTimestamp time.Time + Headers []*RecordHeader + Key []byte + Offset int64 + Partition int32 + Timestamp time.Time + Topic string + Value []byte + type Handler func(ctx context.Context, session sarama.ConsumerGroupSession, ...) error + type ProducerError struct + Err error + Msg *ProducerMessage + type ProducerMessage struct + Key string + MessageID string + Metadata interface{} + Offset int64 + Partition int32 + Timestamp time.Time + Topic string + Value []byte + type Reader interface + Close func() error + CommitMessage func(ctx context.Context, session sarama.ConsumerGroupSession, ...) error + FetchMessage func(ctx context.Context, handler Handler) error + func InitReader(brokers []string, topic, group string) (Reader, error) + func NewReader(brokers []string, topic, group string, opts ...ReaderOpt) (Reader, error) + type ReaderOpt func(o *ReaderOpts) + func ReaderCommitInterval(commitInterval int) ReaderOpt + func ReaderLogger(logger logger.Logger) ReaderOpt + func ReaderServiceName(serviceName string) ReaderOpt + func ReaderStartOffset(offset StartOffset) ReaderOpt + type ReaderOpts struct + Brokers []string + CommitInterval int + GroupID string + Logger logger.Logger + ServiceName string + StartOffset StartOffset + Topic string + type RecordHeader struct + Key []byte + Value []byte + type RequiredAck int16 + const NoResponse + const WaitForAll + const WaitForLocal + type StartOffset int + const OffsetNewest + const OffsetOldest + type Writer interface + Close func() (err error) + Errors func() <-chan *ProducerError + Messages func() <-chan *ProducerMessage + SendMessage func(ctx context.Context, message *ProducerMessage) error + func NewWriter(brokers []string, opts ...WriterOpt) (Writer, error) + type WriterOpt func(o *WriterOpts) + func WriterAsync(async bool) WriterOpt + func WriterLogger(logger logger.Logger) WriterOpt + func WriterMaxAttempts(num int) WriterOpt + func WriterReadTimeout(readTimeout int) WriterOpt + func WriterRequiredAck(requiredAck RequiredAck) WriterOpt + func WriterServiceName(serviceName string) WriterOpt + type WriterOpts struct + Async bool + Brokers []string + Logger logger.Logger + MaxAttempts int + ReadTimeout int + RequiredAck RequiredAck + ServiceName string