Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type KafkaConfigs ¶
type KafkaWorker ¶
type KafkaWorker struct { sync.RWMutex *kafka.Consumer *kafka.Producer Configs *config.Kafka IsConsumer bool IsProducer bool }
func NewKafkaWorker ¶
func NewKafkaWorker(cfg *config.Kafka) (*KafkaWorker, error)
NewKafkaWorker creates a new KafkaWorker and returns it with an error message.
func (*KafkaWorker) ConfigureConsumer ¶
func (k *KafkaWorker) ConfigureConsumer() error
ConfigureConsumer makes the KafkaWorker a consumer
func (*KafkaWorker) ConfigureProducer ¶
func (k *KafkaWorker) ConfigureProducer() error
ConfigureProducer makes the KafkaWorker a producer
func (*KafkaWorker) ConfigurePubSub ¶
func (k *KafkaWorker) ConfigurePubSub() error
func (*KafkaWorker) SubscribeTopics ¶
func (k *KafkaWorker) SubscribeTopics(topics []string) error
SubscribeTopics subscribes to a given list of topics for consuming
Click to show internal directories.
Click to hide internal directories.