initialise

package
v1.19.0 Latest Latest
Warning

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

Go to latest
Published: Oct 30, 2023 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DimensionExtracted = iota
	DimensionExtractedErr
)

Possible names of Kafka Producers

Variables

This section is empty.

Functions

This section is empty.

Types

type ExternalServiceList

type ExternalServiceList struct {
	Consumer                      bool
	DimensionExtractedProducer    bool
	DimensionExtractedErrProducer bool
	Vault                         bool
	S3Clients                     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(dimensionExtractedErrProducer reporter.KafkaProducer, serviceName string) (errorReporter reporter.ImportErrorReporter, err error)

GetImportErrorReporter returns an ErrorImportReporter to send error reports to the import-reporter (only if DimensionExtractedErrProducer 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.

func (*ExternalServiceList) GetS3Clients

func (e *ExternalServiceList) GetS3Clients(cfg *config.Config) (awsSession *session.Session, s3Clients map[string]service.S3Client, err error)

GetS3Clients returns a map of AWS S3 clients corresponding to the list of BucketNames and the AWS region provided in the configuration

func (*ExternalServiceList) GetVault

func (e *ExternalServiceList) GetVault(cfg *config.Config, retries int) (client *vault.Client, err error)

GetVault returns a vault client

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