config

package
v1.71.0 Latest Latest
Warning

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

Go to latest
Published: Nov 23, 2023 License: MIT Imports: 3 Imported by: 6

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IsEnabledRelCalABTest added in v1.51.0

func IsEnabledRelCalABTest(cfg Config) bool

IsEnabledRelCalABTest checks whether ab test is enabled and that percentage is a sensible int value

Types

type AWS added in v1.43.0

type AWS struct {
	AccessKeyID     string `envconfig:"AWS_ACCESS_KEY_ID"      json:"-"`
	Region          string `envconfig:"AWS_REGION"`
	SecretAccessKey string `envconfig:"AWS_SECRET_ACCESS_KEY"  json:"-"`
}

type Config added in v1.9.0

type Config struct {
	AWS                             AWS
	APIRouterURL                    string        `envconfig:"API_ROUTER_URL"`
	AreaProfilesControllerURL       string        `envconfig:"AREA_PROFILE_CONTROLLER_URL"`
	AreaProfilesRoutesEnabled       bool          `envconfig:"AREA_PROFILE_ROUTES_ENABLED"`
	BabbageURL                      string        `envconfig:"BABBAGE_URL"`
	BindAddr                        string        `envconfig:"BIND_ADDR"`
	CensusAtlasRoutesEnabled        bool          `envconfig:"CENSUS_ATLAS_ROUTES_ENABLED"`
	CensusAtlasURL                  string        `envconfig:"CENSUS_ATLAS_URL"`
	ContentTypeByteLimit            int           `envconfig:"CONTENT_TYPE_BYTE_LIMIT"`
	CookiesControllerURL            string        `envconfig:"COOKIES_CONTROLLER_URL"`
	DatasetControllerURL            string        `envconfig:"DATASET_CONTROLLER_URL"`
	DatasetFinderEnabled            bool          `envconfig:"DATASET_FINDER_ENABLED"`
	DownloaderURL                   string        `envconfig:"DOWNLOADER_URL"`
	EnableReleaseCalendarABTest     bool          `envconfig:"ENABLE_RELEASE_CALENDAR_AB_TEST"`
	FeedbackControllerURL           string        `envconfig:"FEEDBACK_CONTROLLER_URL"`
	FeedbackEnabled                 bool          `envconfig:"FEEDBACK_ENABLED"`
	FilterDatasetControllerURL      string        `envconfig:"FILTER_DATASET_CONTROLLER_URL"`
	FilterFlexDatasetServiceURL     string        `envconfig:"FILTER_FLEX_DATASET_SERVICE_URL"`
	GeographyControllerURL          string        `envconfig:"GEOGRAPHY_CONTROLLER_URL"`
	GeographyEnabled                bool          `envconfig:"GEOGRAPHY_ENABLED"`
	HealthcheckCriticalTimeout      time.Duration `envconfig:"HEALTHCHECK_CRITICAL_TIMEOUT"`
	HealthcheckInterval             time.Duration `envconfig:"HEALTHCHECK_INTERVAL"`
	HomepageControllerURL           string        `envconfig:"HOMEPAGE_CONTROLLER_URL"`
	HTTPMaxConnections              int           `envconfig:"HTTP_MAX_CONNECTIONS"`
	LegacySearchRedirectsEnabled    bool          `envconfig:"LEGACY_SEARCH_REDIRECTS_ENABLED"`
	NewDatasetRoutingEnabled        bool          `envconfig:"NEW_DATASET_ROUTING_ENABLED"`
	OTExporterOTLPEndpoint          string        `envconfig:"OTEL_EXPORTER_OTLP_ENDPOINT"`
	OTServiceName                   string        `envconfig:"OTEL_SERVICE_NAME"`
	OTBatchTimeout                  time.Duration `envconfig:"OTEL_BATCH_TIMEOUT"`
	PatternLibraryAssetsPath        string        `envconfig:"PATTERN_LIBRARY_ASSETS_PATH"`
	ProxyTimeout                    time.Duration `envconfig:"PROXY_TIMEOUT"`
	RedirectSecret                  string        `envconfig:"REDIRECT_SECRET" json:"-"`
	ReleaseCalendarControllerURL    string        `envconfig:"RELEASE_CALENDAR_CONTROLLER_URL"`
	ReleaseCalendarEnabled          bool          `envconfig:"RELEASE_CALENDAR_ENABLED"`
	ReleaseCalendarRoutePrefix      string        `envconfig:"RELEASE_CALENDAR_ROUTE_PREFIX"`
	ReleaseCalendarABTestPercentage int           `envconfig:"RELEASE_CALENDAR_AB_TEST_PERCENTAGE"`
	SearchControllerURL             string        `envconfig:"SEARCH_CONTROLLER_URL"`
	SearchRoutesEnabled             bool          `envconfig:"SEARCH_ROUTES_ENABLED"`
	SiteDomain                      string        `envconfig:"SITE_DOMAIN"`
	SQSAnalyticsURL                 string        `envconfig:"SQS_ANALYTICS_URL"`
	ZebedeeRequestMaximumRetries    int           `envconfig:"ZEBEDEE_REQUEST_MAXIMUM_RETRIES"`
	ZebedeeRequestMaximumTimeout    time.Duration `envconfig:"ZEBEDEE_REQUEST_TIMEOUT_SECONDS"`
}

Config represents service configuration for dp-frontend-router

func Get added in v1.9.0

func Get() (*Config, error)

Get returns the default config with any modifications made through environment variables

Jump to

Keyboard shortcuts

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