initialise

package
v1.12.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: 11 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Observation = iota
	ErrorReporter
)

Possible names of Kafka Producers

Variables

This section is empty.

Functions

This section is empty.

Types

type ExternalServiceList

type ExternalServiceList struct {
	Consumer              bool
	ObservationProducer   bool
	ErrorReporterProducer bool
	Vault                 bool
	HealthCheck           bool
	S3Clients             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

func (*ExternalServiceList) GetHealthChecker

func (e *ExternalServiceList) GetHealthChecker(ctx context.Context, buildTime, gitCommit, version string, cfg *config.Config) (*healthcheck.HealthCheck, error)

GetHealthChecker creates a new healthcheck object

func (*ExternalServiceList) GetProducer

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

GetProducer returns a kafka producer, which might not be initialised

func (*ExternalServiceList) GetS3Clients

func (e *ExternalServiceList) GetS3Clients(cfg *config.Config) (awsSession *session.Session, s3Clients map[string]event.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. If encryption is enabled, the s3clients will be cryptoclients.

type KafkaProducerName

type KafkaProducerName int

KafkaProducerName represents a 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