initialise

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: 6 Imported by: 0

Documentation

Index

Constants

View Source
const (
	SearchBuilt = iota
	SearchBuilderErr
)

Possible names of Kafa Producers

Variables

This section is empty.

Functions

This section is empty.

Types

type ExternalServiceList

type ExternalServiceList struct {
	Consumer                 bool
	SearchBuiltProducer      bool
	SearchBuilderErrProducer bool
	ElasticSearch            bool
	ErrorReporter            bool
	HealthCheck              bool
}

ExternalServiceList represents a list of services

func (*ExternalServiceList) GetConsumer

func (e *ExternalServiceList) GetConsumer(ctx context.Context, kafkaConfig config.KafkaConfig) (kafkaConsumer *kafka.ConsumerGroup, err error)

GetConsumer returns a kafka consumer, which might not be initialised yet.

func (*ExternalServiceList) GetHealthCheck

func (e *ExternalServiceList) GetHealthCheck(cfg *config.Config, buildTime, gitCommit, version string) (healthcheck.HealthCheck, error)

GetHealthCheck creates a healthcheck with versionInfo

func (*ExternalServiceList) GetImportErrorReporter

func (e *ExternalServiceList) GetImportErrorReporter(searchBuilderErrProducer reporter.KafkaProducer, serviceName string) (errorReporter reporter.ImportErrorReporter, err error)

GetImportErrorReporter returns an ErrorImportReporter to send error reports to the import-reporter (only if ObservationsImportedErrProducer is available)

func (*ExternalServiceList) GetProducer

func (e *ExternalServiceList) GetProducer(ctx context.Context, kafkaConfig config.KafkaConfig, topic string, name KafkaProducerName, envMax int) (kafkaProducer *kafka.Producer, err error)

GetProducer returns a kafka producer, which might not be initialised yet.

type KafkaProducerName

type KafkaProducerName int

KafkaProducerName : Type for kafka producer name used by iota constants

func (KafkaProducerName) String

func (k KafkaProducerName) String() string

Values of the kafka producers names

Jump to

Keyboard shortcuts

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