Documentation
¶
Index ¶
- Constants
- type ExternalServiceList
- func (e *ExternalServiceList) GetGraphDB(ctx context.Context, cfg *config.Configuration) (*graph.DB, error)
- func (e *ExternalServiceList) GetHealthCheck(cfg *config.Configuration, buildTime, gitCommit, version string) (healthcheck.HealthCheck, error)
- func (e *ExternalServiceList) GetMongoDB(ctx context.Context, cfg *config.Configuration) (*mongoHealth.Client, *mongo.Mongo, error)
- func (e *ExternalServiceList) GetProducer(ctx context.Context, kafkaBrokers []string, topic string, ...) (kafkaProducer *kafka.Producer, err error)
- type KafkaProducerName
Constants ¶
View Source
const ( Audit = iota GenerateDownloads )
Possible names of Kafa Producers
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ExternalServiceList ¶
type ExternalServiceList struct {
AuditProducer bool
GenerateDownloadsProducer bool
Graph bool
HealthCheck bool
MongoDB bool
}
ExternalServiceList represents a list of services
func (*ExternalServiceList) GetGraphDB ¶
func (e *ExternalServiceList) GetGraphDB(ctx context.Context, cfg *config.Configuration) (*graph.DB, error)
GetGraphDB returns a graphDB
func (*ExternalServiceList) GetHealthCheck ¶
func (e *ExternalServiceList) GetHealthCheck(cfg *config.Configuration, buildTime, gitCommit, version string) (healthcheck.HealthCheck, error)
GetHealthCheck creates a healthcheck with versionInfo
func (*ExternalServiceList) GetMongoDB ¶
func (e *ExternalServiceList) GetMongoDB(ctx context.Context, cfg *config.Configuration) (*mongoHealth.Client, *mongo.Mongo, error)
GetMongoDB returns a mongodb client and dataset mongo object
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, 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
Click to show internal directories.
Click to hide internal directories.