Documentation ¶
Index ¶
- func ConsumeFromTopic(ctx context.Context, cancel context.CancelFunc, groupID string, topic string, ...)
- func MarshalKafkaDataToStruct(data []byte, structToMarshal interface{}) error
- func NewReader(cfg kafka.ReaderConfig, log logger.Logger) *kafka.Reader
- func NewWriter(writer kafka.Writer, log logger.Logger) *kafka.Writer
- func UnmarshalToKafkaMessage(data []byte) (models.KafkaMessage, error)
- func WriteToTopicInBackground(ctx context.Context, writer *kafka.Writer, topic string, key string, ...) error
- type ConsumerReaderConfig
- type ConsumerWriterConfig
- type Reader
- type WriterConfig
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ConsumeFromTopic ¶ added in v0.5.79
func ConsumeFromTopic( ctx context.Context, cancel context.CancelFunc, groupID string, topic string, workersNum int, workerFunc func(ctx context.Context, cancel context.CancelFunc, r *kafka.Reader, w *kafka.Writer, wg *sync.WaitGroup, workerID int), readerConfig ConsumerReaderConfig, writerConfig ConsumerWriterConfig, logger logger.Logger, )
func MarshalKafkaDataToStruct ¶ added in v0.5.62
func UnmarshalToKafkaMessage ¶ added in v0.5.62
func UnmarshalToKafkaMessage(data []byte) (models.KafkaMessage, error)
Types ¶
type ConsumerReaderConfig ¶ added in v0.5.79
type ConsumerWriterConfig ¶ added in v0.5.79
type WriterConfig ¶
Click to show internal directories.
Click to hide internal directories.