config

package
v1.17.0 Latest Latest
Warning

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

Go to latest
Published: Jul 8, 2021 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	BindAddr                   string        `envconfig:"BIND_ADDR"`
	KafkaAddr                  []string      `envconfig:"KAFKA_ADDR"`
	KafkaVersion               string        `envconfig:"KAFKA_VERSION"`
	KafkaConsumerWorkers       int           `envconfig:"KAFKA_CONSUMER_WORKERS"`
	FilterConsumerGroup        string        `envconfig:"FILTER_JOB_CONSUMER_GROUP"`
	FilterConsumerTopic        string        `envconfig:"FILTER_JOB_CONSUMER_TOPIC"`
	FilterAPIURL               string        `envconfig:"FILTER_API_URL"`
	AWSRegion                  string        `envconfig:"AWS_REGION"`
	S3BucketName               string        `envconfig:"S3_BUCKET_NAME"`
	S3BucketURL                string        `envconfig:"S3_BUCKET_URL"`
	S3PrivateBucketName        string        `envconfig:"S3_PRIVATE_BUCKET_NAME"`
	CSVExportedProducerTopic   string        `envconfig:"CSV_EXPORTED_PRODUCER_TOPIC"`
	DatasetAPIURL              string        `envconfig:"DATASET_API_URL"`
	ErrorProducerTopic         string        `envconfig:"ERROR_PRODUCER_TOPIC"`
	GracefulShutdownTimeout    time.Duration `envconfig:"GRACEFUL_SHUTDOWN_TIMEOUT"`
	HealthCheckInterval        time.Duration `envconfig:"HEALTHCHECK_INTERVAL"`
	HealthCheckCriticalTimeout time.Duration `envconfig:"HEALTHCHECK_CRITICAL_TIMEOUT"`
	VaultToken                 string        `envconfig:"VAULT_TOKEN"                   json:"-"`
	VaultAddress               string        `envconfig:"VAULT_ADDR"`
	VaultPath                  string        `envconfig:"VAULT_PATH"`
	DownloadServiceURL         string        `envconfig:"DOWNLOAD_SERVICE_URL"`
	APIDomainURL               string        `envconfig:"API_DOMAIN_URL"`
	ServiceAuthToken           string        `envconfig:"SERVICE_AUTH_TOKEN"            json:"-"`
	StartupTimeout             time.Duration `envconfig:"STARTUP_TIMEOUT"`
	ZebedeeURL                 string        `envconfig:"ZEBEDEE_URL"`
	FullDatasetFilePrefix      string        `envconfig:"FULL_DATASET_FILE_PREFIX"`
	FilteredDatasetFilePrefix  string        `envconfig:"FILTERED_DATASET_FILE_PREFIX"`
}

Config values for the application.

func Get

func Get() (*Config, error)

Get the configuration values from the environment or provide the defaults.

func (Config) String

func (config Config) String() string

String is implemented to prevent sensitive fields being logged. The config is returned as JSON with sensitive fields omitted.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL