config

package
v1.4.1 Latest Latest
Warning

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

Go to latest
Published: May 23, 2024 License: MIT Imports: 2 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"`
	GracefulShutdownTimeout    time.Duration `envconfig:"GRACEFUL_SHUTDOWN_TIMEOUT"`
	HealthCheckInterval        time.Duration `envconfig:"HEALTHCHECK_INTERVAL"`
	HealthCheckCriticalTimeout time.Duration `envconfig:"HEALTHCHECK_CRITICAL_TIMEOUT"`
	OTBatchTimeout             time.Duration `encconfig:"OTEL_BATCH_TIMEOUT"`
	OTExporterOTLPEndpoint     string        `envconfig:"OTEL_EXPORTER_OTLP_ENDPOINT"`
	OTServiceName              string        `envconfig:"OTEL_SERVICE_NAME"`
	BabbageURL                 string        `envconfig:"BABBAGE_URL"`
	RelCalURL                  string        `envconfig:"RELEASE_CALENDAR_URL"`
	EnableReleaseCalendar      bool          `envconfig:"ENABLE_RELEASE_CALENDAR"`
	LegacyCacheAPIURL          string        `envconfig:"LEGACY_CACHE_API_URL"`
	CacheTimeDefault           time.Duration `envconfig:"CACHE_TIME_DEFAULT"`
	CacheTimeErrored           time.Duration `envconfig:"CACHE_TIME_ERRORED"`
	CacheTimeLong              time.Duration `envconfig:"CACHE_TIME_LONG"`
	CacheTimeShort             time.Duration `envconfig:"CACHE_TIME_SHORT"`
	EnablePublishExpiryOffset  bool          `envconfig:"ENABLE_PUBLISH_EXPIRY_OFFSET"`
	PublishExpiryOffset        time.Duration `envconfig:"PUBLISH_EXPIRY_OFFSET"`
	ReadTimeout                time.Duration `envconfig:"READ_TIMEOUT"`
	WriteTimeout               time.Duration `envconfig:"WRITE_TIMEOUT"`
	OtelEnabled                bool          `envconfig:"OTEL_ENABLED"`
}

Config represents service configuration for dp-legacy-cache-proxy

func Get

func Get() (*Config, error)

Get returns the default config with any modifications through environment variables

Jump to

Keyboard shortcuts

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