Documentation
¶
Overview ¶
Package conf contains definition of data type named ConfigStruct that represents configuration of Insights Results Aggregator. This package also contains function named LoadConfiguration that can be used to load configuration from provided configuration file and/or from environment variables. Additionally several specific functions named GetBrokerConfiguration, GetStorageConfiguration, GetLoggingConfiguration, GetCloudWatchConfiguration, and GetServerConfiguration are to be used to return specific configuration options.
Generated documentation is available at: https://godoc.org/github.com/RedHatInsights/insights-results-aggregator/conf
Documentation in literate-programming-style is available at: https://redhatinsights.github.io/insights-results-aggregator/packages/conf/configuration.html
Index ¶
- func GetBrokerConfiguration() broker.Configuration
- func GetCloudWatchConfiguration() logger.CloudWatchConfiguration
- func GetDVORecommendationsStorageConfiguration() storage.Configuration
- func GetKafkaZerologConfiguration() logger.KafkaZerologConfiguration
- func GetLoggingConfiguration() logger.LoggingConfiguration
- func GetOCPRecommendationsStorageConfiguration() storage.Configuration
- func GetRedisConfiguration() storage.RedisConfiguration
- func GetSentryLoggingConfiguration() logger.SentryLoggingConfiguration
- func GetServerConfiguration() server.Configuration
- func LoadConfiguration(defaultConfigFile string) error
- type ConfigStruct
- type MetricsConfiguration
- type StorageBackend
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetBrokerConfiguration ¶
func GetBrokerConfiguration() broker.Configuration
GetBrokerConfiguration returns broker configuration
func GetCloudWatchConfiguration ¶
func GetCloudWatchConfiguration() logger.CloudWatchConfiguration
GetCloudWatchConfiguration returns cloudwatch configuration
func GetDVORecommendationsStorageConfiguration ¶ added in v1.4.0
func GetDVORecommendationsStorageConfiguration() storage.Configuration
GetDVORecommendationsStorageConfiguration returns storage configuration for DVO recommendations database
func GetKafkaZerologConfiguration ¶ added in v1.1.3
func GetKafkaZerologConfiguration() logger.KafkaZerologConfiguration
GetKafkaZerologConfiguration returns the kafkazero log configuration
func GetLoggingConfiguration ¶
func GetLoggingConfiguration() logger.LoggingConfiguration
GetLoggingConfiguration returns logging configuration
func GetOCPRecommendationsStorageConfiguration ¶ added in v1.4.0
func GetOCPRecommendationsStorageConfiguration() storage.Configuration
GetOCPRecommendationsStorageConfiguration returns storage configuration for OCP recommendations database
func GetRedisConfiguration ¶ added in v1.4.0
func GetRedisConfiguration() storage.RedisConfiguration
GetRedisConfiguration returns Redis storage configuration
func GetSentryLoggingConfiguration ¶ added in v1.1.3
func GetSentryLoggingConfiguration() logger.SentryLoggingConfiguration
GetSentryLoggingConfiguration returns the sentry log configuration
func GetServerConfiguration ¶
func GetServerConfiguration() server.Configuration
GetServerConfiguration returns server configuration
func LoadConfiguration ¶
LoadConfiguration loads configuration from defaultConfigFile, file set in configFileEnvVariableName or from env or from Clowder.
Types ¶
type ConfigStruct ¶ added in v1.1.0
type ConfigStruct struct { Broker broker.Configuration `mapstructure:"broker" toml:"broker"` Server server.Configuration `mapstructure:"server" toml:"server"` Processing struct { OrgAllowlistFile string `mapstructure:"org_allowlist_file" toml:"org_allowlist_file"` } `mapstructure:"processing"` OCPRecommendationsStorage storage.Configuration `mapstructure:"ocp_recommendations_storage" toml:"ocp_recommendations_storage"` DVORecommendationsStorage storage.Configuration `mapstructure:"dvo_recommendations_storage" toml:"dvo_recommendations_storage"` StorageBackend StorageBackend `mapstructure:"storage_backend" toml:"storage_backend"` Logging logger.LoggingConfiguration `mapstructure:"logging" toml:"logging"` CloudWatch logger.CloudWatchConfiguration `mapstructure:"cloudwatch" toml:"cloudwatch"` Redis storage.RedisConfiguration `mapstructure:"redis" toml:"redis"` Metrics MetricsConfiguration `mapstructure:"metrics" toml:"metrics"` SentryLoggingConf logger.SentryLoggingConfiguration `mapstructure:"sentry" toml:"sentry"` KafkaZerologConf logger.KafkaZerologConfiguration `mapstructure:"kafka_zerolog" toml:"kafka_zerolog"` }
ConfigStruct is a structure holding the whole service configuration
var Config ConfigStruct
Config has exactly the same structure as *.toml file
type MetricsConfiguration ¶ added in v1.1.0
type MetricsConfiguration struct {
Namespace string `mapstructure:"namespace" toml:"namespace"`
}
MetricsConfiguration holds metrics related configuration
func GetMetricsConfiguration ¶ added in v1.1.0
func GetMetricsConfiguration() MetricsConfiguration
GetMetricsConfiguration returns metrics configuration
type StorageBackend ¶ added in v1.4.0
type StorageBackend struct {
Use string `mapstructure:"use" toml:"use"`
}
StorageBackend contains global storage backend configuration
func GetStorageBackendConfiguration ¶ added in v1.4.0
func GetStorageBackendConfiguration() StorageBackend
GetStorageBackendConfiguration returns storage backend configuration