kafka

package
v0.0.0-...-1afb120 Latest Latest
Warning

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

Go to latest
Published: Mar 2, 2023 License: MIT Imports: 17 Imported by: 0

Documentation

Index

Constants

View Source
const (
	TopicRegistrationReq = "user.registration.req"
	TopicLoginReq        = "user.login.req"
	TopicRegistrations   = "user.registrations"
	TopicLogins          = "user.logins"
)
View Source
const (
	KeyCorrelationID = "correlation_id"
)

Variables

This section is empty.

Functions

func NewController

func NewController(userService service.Service, kafkaBrokerURLs string) (controller.Controller, error)

Types

type LoginWorker

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

func (LoginWorker) Process

func (w LoginWorker) Process(ctx context.Context) error

func (LoginWorker) Stop

func (w LoginWorker) Stop() error

type RegistrationWorker

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

func (RegistrationWorker) Process

func (w RegistrationWorker) Process(ctx context.Context) error

func (RegistrationWorker) Stop

func (w RegistrationWorker) Stop() error

type Worker

type Worker interface {
	Process(ctx context.Context) error
	Stop() error
}

func NewLoginWorker

func NewLoginWorker(userService service.Service, brokers []string) (Worker, error)

func NewRegistrationWorker

func NewRegistrationWorker(userService service.Service, brokers []string) (Worker, error)

Jump to

Keyboard shortcuts

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