kafka

package
v0.0.0-...-4c0fd1a Latest Latest
Warning

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

Go to latest
Published: Jul 18, 2022 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

ProviderSet is kafka providers.

Functions

This section is empty.

Types

type ConsumerServer

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

func NewConsumerServer

func NewConsumerServer(conf *conf.Kafka, obs observer.ChatsObserver, logger log.Logger) *ConsumerServer

func (*ConsumerServer) Start

func (s *ConsumerServer) Start(ctx context.Context) error

func (*ConsumerServer) Stop

func (s *ConsumerServer) Stop(ctx context.Context) error

type MessagesProducer

type MessagesProducer interface {
	Write(context.Context, int64, *v1.NewMessage) error
}

func NewProducer

func NewProducer(conf *conf.Kafka, logger log.Logger) (MessagesProducer, func())

type Producer

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

func (*Producer) Write

func (p *Producer) Write(ctx context.Context, chatId int64, msg *v1.NewMessage) error

Jump to

Keyboard shortcuts

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