kafkaService

package
v0.0.0-...-53b3255 Latest Latest
Warning

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

Go to latest
Published: Apr 8, 2023 License: GPL-3.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateKafkaConsumer

func CreateKafkaConsumer(brokerURL, topic string) *kafka.Reader

func CreateKafkaProducer

func CreateKafkaProducer(brokerURL string) *kafka.Writer

Types

type KafkaService

type KafkaService struct {
	Producer *kafka.Writer
	Consumer *kafka.Reader
}

func NewKafkaService

func NewKafkaService(producer *kafka.Writer, consumer *kafka.Reader) *KafkaService

func (*KafkaService) ConsumeUserNotifications

func (ks *KafkaService) ConsumeUserNotifications(username string)

func (*KafkaService) SendUserNotification

func (ks *KafkaService) SendUserNotification(notification models.Notification) error

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL
JackTT - Gopher 🇻🇳