initialise

package
v1.8.0 Latest Latest
Warning

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

Go to latest
Published: Apr 20, 2020 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Audit = iota
	DataBaker
	Direct
)

Possible names of Kafka Producers

Variables

This section is empty.

Functions

This section is empty.

Types

type ExternalServiceList

type ExternalServiceList struct {
	AuditProducer     bool
	DataBakerProducer bool
	DirectProducer    bool
	MongoDataStore    bool
}

ExternalServiceList represents a list of services

func (*ExternalServiceList) GetMongoDataStore

func (e *ExternalServiceList) GetMongoDataStore(cfg *config.Configuration) (dataStore *mongo.Mongo, err error)

GetMongoDataStore returns an initialised connection to import store (mongo database)

func (*ExternalServiceList) GetProducer

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

GetProducer returns a kafka producer

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