config

package
v1.11.0 Latest Latest
Warning

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

Go to latest
Published: Jul 7, 2025 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"`
	EnableSearchController      bool          `envconfig:"ENABLE_SEARCH_CONTROLLER"`
	SearchControllerURL         string        `envconfig:"SEARCH_CONTROLLER_URL"`
	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"`
	StaleWhileRevalidateSeconds int64         `envconfig:"STALE_WHILE_REVALIDATE_SECONDS"`
	EnableMaxAgeCountdown       bool          `envconfig:"ENABLE_MAX_AGE_COUNTDOWN"`
	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