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 (
	TopicRecipes        = "recipes"
	TopicIngredients    = "ingredients"
	TopicNutritionFacts = "nutritionfacts"
	TopicIngredientsReq = "ingredients.req"
)
View Source
const (
	KeyCorrelationID = "correlation_id"
)

Variables

This section is empty.

Functions

func NewController

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

Types

type RecipeWorker

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

func (RecipeWorker) Process

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

func (RecipeWorker) Stop

func (w RecipeWorker) Stop() error

type Worker

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

func NewRecipeWorker

func NewRecipeWorker(nutritionService service.Service, brokers []string) (Worker, error)

Jump to

Keyboard shortcuts

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