config

package
v1.43.1 Latest Latest
Warning

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

Go to latest
Published: Mar 7, 2024 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 AWS

type AWS struct {
	Filename              string `envconfig:"AWS_FILENAME"`
	Profile               string `envconfig:"AWS_PROFILE"`
	Region                string `envconfig:"AWS_REGION"`
	Service               string `envconfig:"AWS_SERVICE"`
	Signer                bool   `envconfig:"AWS_SIGNER"`
	TLSInsecureSkipVerify bool   `envconfig:"AWS_TLS_INSECURE_SKIP_VERIFY"`
}

type Config

type Config struct {
	AWS                        AWS
	BerlinAPIURL               string        `envconfig:"BERLIN_URL"`
	CategoryAPIURL             string        `envconfig:"CATEGORY_URL"`
	BindAddr                   string        `envconfig:"BIND_ADDR"`
	ElasticSearchAPIURL        string        `envconfig:"ELASTIC_SEARCH_URL"`
	GracefulShutdownTimeout    time.Duration `envconfig:"GRACEFUL_SHUTDOWN_TIMEOUT"`
	HealthCheckCriticalTimeout time.Duration `envconfig:"HEALTHCHECK_CRITICAL_TIMEOUT"`
	HealthCheckInterval        time.Duration `envconfig:"HEALTHCHECK_INTERVAL"`
	NLPSettings                string        `envconfig:"NLP_SETTINGS"`
	EnableNLPWeighting         bool          `envconfig:"ENABLE_NLP_WEIGHTING"`
	ScrubberAPIURL             string        `envconfig:"SCRUBBER_URL"`
	OTBatchTimeout             time.Duration `encconfig:"OTEL_BATCH_TIMEOUT"`
	OTServiceName              string        `envconfig:"OTEL_SERVICE_NAME"`
	OTExporterOTLPEndpoint     string        `envconfig:"OTEL_EXPORTER_OTLP_ENDPOINT"`
	OtelEnabled                bool          `envconfig:"OTEL_ENABLED"`
	ZebedeeURL                 string        `envconfig:"ZEBEDEE_URL"`
}

Config is the search API handler config

func Get

func Get() (*Config, error)

Get configures the application and returns the Config

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