config

package
v1.6.0 Latest Latest
Warning

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

Go to latest
Published: Apr 15, 2020 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"`
	Brokers                    []string      `envconfig:"KAFKA_ADDR"                     json:"-"`
	DatasetAPIURL              string        `envconfig:"DATASET_API_URL"`
	DimensionsExtractedTopic   string        `envconfig:"DIMENSIONS_EXTRACTED_TOPIC"`
	DimensionExtractorURL      string        `envconfig:"DIMENSION_EXTRACTOR_URL"`
	EncryptionDisabled         bool          `envconfig:"ENCRYPTION_DISABLED"`
	EventReporterTopic         string        `envconfig:"EVENT_REPORTER_TOPIC"`
	GracefulShutdownTimeout    time.Duration `envconfig:"GRACEFUL_SHUTDOWN_TIMEOUT"`
	InputFileAvailableGroup    string        `envconfig:"INPUT_FILE_AVAILABLE_GROUP"`
	InputFileAvailableTopic    string        `envconfig:"INPUT_FILE_AVAILABLE_TOPIC"`
	KafkaMaxBytes              string        `envconfig:"KAFKA_MAX_BYTES"`
	MaxRetries                 int           `envconfig:"REQUEST_MAX_RETRIES"`
	VaultAddr                  string        `envconfig:"VAULT_ADDR"`
	VaultToken                 string        `envconfig:"VAULT_TOKEN"                    json:"-"`
	VaultPath                  string        `envconfig:"VAULT_PATH"`
	ServiceAuthToken           string        `envconfig:"SERVICE_AUTH_TOKEN"             json:"-"`
	ZebedeeURL                 string        `envconfig:"ZEBEDEE_URL"`
	HealthCheckInterval        time.Duration `envconfig:"HEALTHCHECK_INTERVAL"`
	HealthCheckCriticalTimeout time.Duration `envconfig:"HEALTHCHECK_CRITICAL_TIMEOUT"`
	AWSRegion                  string        `envconfig:"AWS_REGION"`
	BucketNames                []string      `envconfig:"BUCKET_NAMES"                  json:"-"`
}

Config is the filing resource handler config

func Get

func Get() (*Config, error)

Get configures the application and returns the configuration

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