initialise

package
v1.12.0 Latest Latest
Warning

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

Go to latest
Published: Oct 1, 2020 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	CSVExported = iota
	Error
)

Possible names of Kafka Producers

Variables

This section is empty.

Functions

This section is empty.

Types

type ExternalServiceList

type ExternalServiceList struct {
	Consumer            bool
	CSVExportedProducer bool
	ErrorProducer       bool
	EventConsumer       bool
	FileStore           bool
	ObservationStore    bool
	HealthCheck         bool
	Vault               bool
}

ExternalServiceList represents a list of services

func (*ExternalServiceList) GetConsumer

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

GetConsumer returns a kafka consumer, which might not be initialised

func (*ExternalServiceList) GetFileStore

func (e *ExternalServiceList) GetFileStore(cfg *config.Config, vaultClient *vault.Client) (fileStore *file.Store, err error)

GetFileStore returns an initialised connection to file store

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) GetObservationStore

func (e *ExternalServiceList) GetObservationStore(ctx context.Context) (observationStore *graph.DB, err error)

GetObservationStore returns an initialised connection to observation store (graph database)

func (*ExternalServiceList) GetProducer

func (e *ExternalServiceList) GetProducer(ctx context.Context, kafkaBrokers []string, topic string, name KafkaProducerName) (kafkaProducer *kafka.Producer, err error)

GetProducer returns a kafka producer, which might no be initialised

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 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