kfkempl

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: May 31, 2023 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const SubscribeGroup = "consumer-service"

Variables

This section is empty.

Functions

This section is empty.

Types

type DBUser

type DBUser struct {
}

type EventMessage

type EventMessage[T EventMessageObjectType] interface {
	*T
	proto.Message
	GetEvent() *kafkaemployees.Event
	Len() int
}

type EventMessageObjectType

type EventMessageObjectType any

type SimpleSubscribe

type SimpleSubscribe[OTM, OTD EventMessageObjectType, TM EventMessage[OTM], TD EventMessage[OTD], M any] struct {
	Kfk *kafkaframe.Kafka
	CntModify,
	CntDelete,
	CntErrors prometheus.Counter
	DurSec          prometheus.Histogram
	TopicModify     string
	TopicDelete     string
	ProcessModify   func(t TM) ([]M, error)
	GetIdsForDelete func(t TD) ([]string, error)
}

func (*SimpleSubscribe[OTM, OTD, TM, TD, M]) Serve

func (s *SimpleSubscribe[OTM, OTD, TM, TD, M]) Serve(ctx context.Context)

type UsersSubscribe

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

func NewUsersSubscribe

func NewUsersSubscribe(ctx context.Context, kfk *kafkaframe.Kafka) *UsersSubscribe

Jump to

Keyboard shortcuts

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