event

package
v1.13.0 Latest Latest
Warning

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

Go to latest
Published: May 16, 2023 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type APIs

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

APIs represent a list of API interfaces used by service

type Consumer

type Consumer struct {
	Service Service
	// contains filtered or unexported fields
}

Consumer consumes event messages.

func NewConsumer

func NewConsumer(clienter http.Clienter, hierarchyAPIURL string, elasticSearchClient *elasticsearch.Client,
	searchBuiltProducer *kafka.Producer, errorReporter reporter.ImportErrorReporter) *Consumer

NewConsumer returns a new consumer instance.

func (*Consumer) Close

func (consumer *Consumer) Close(ctx context.Context) (err error)

Close safely closes the consumer and releases all resources

func (*Consumer) Consume

func (consumer *Consumer) Consume(ctx context.Context, messageConsumer *kafka.ConsumerGroup)

Consume handles consumption of events

type Service

type Service struct {
	ErrorReporter       reporter.ImportErrorReporter
	HierarchyAPIURL     string
	HTTPClienter        http.Clienter
	SearchBuiltProducer *kafka.Producer
	ElasticSearchClient *elasticsearch.Client
}

Service contains service configuration for consumer

Jump to

Keyboard shortcuts

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