kafka

package
v0.5.70 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 28, 2023 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func MarshalKafkaDataToStruct added in v0.5.62

func MarshalKafkaDataToStruct(data []byte, structToMarshal interface{}) error

func NewReader

func NewReader(cfg kafka.ReaderConfig, log logger.Logger) *kafka.Reader

func NewWriter

func NewWriter(writer kafka.Writer, log logger.Logger) *kafka.Writer

func UnmarshalToKafkaMessage added in v0.5.62

func UnmarshalToKafkaMessage(data []byte) (models.KafkaMessage, error)

func WriteToTopicInBackground added in v0.5.5

func WriteToTopicInBackground(
	ctx context.Context,
	writer *kafka.Writer,
	topic string,
	key string,
	value models.KafkaMessage,
	log logger.Logger,
) error

Types

type Reader

type Reader struct {
	// contains filtered or unexported fields
}

type WriterConfig

type WriterConfig struct {
	Logger logger.Logger
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL