config

package
v1.41.0 Latest Latest
Warning

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

Go to latest
Published: Apr 13, 2022 License: MIT Imports: 2 Imported by: 6

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IsEnableSearchABTest added in v1.32.0

func IsEnableSearchABTest(cfg Config) bool

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

Types

type Config added in v1.9.0

type Config struct {
	BindAddr                            string        `envconfig:"BIND_ADDR"`
	BabbageURL                          string        `envconfig:"BABBAGE_URL"`
	RendererURL                         string        `envconfig:"RENDERER_URL"`
	CookiesControllerURL                string        `envconfig:"COOKIES_CONTROLLER_URL"`
	HomepageControllerURL               string        `envconfig:"HOMEPAGE_CONTROLLER_URL"`
	DatasetControllerURL                string        `envconfig:"DATASET_CONTROLLER_URL"`
	FilterDatasetControllerURL          string        `envconfig:"FILTER_DATASET_CONTROLLER_URL"`
	GeographyControllerURL              string        `envconfig:"GEOGRAPHY_CONTROLLER_URL"`
	GeographyEnabled                    bool          `envconfig:"GEOGRAPHY_ENABLED"`
	FeedbackControllerURL               string        `envconfig:"FEEDBACK_CONTROLLER_URL"`
	FeedbackEnabled                     bool          `envconfig:"FEEDBACK_ENABLED"`
	SearchControllerURL                 string        `envconfig:"SEARCH_CONTROLLER_URL"`
	SearchRoutesEnabled                 bool          `envconfig:"SEARCH_ROUTES_ENABLED"`
	APIRouterURL                        string        `envconfig:"API_ROUTER_URL"`
	DownloaderURL                       string        `envconfig:"DOWNLOADER_URL"`
	AreaProfilesControllerURL           string        `envconfig:"AREA_PROFILE_CONTROLLER_URL"`
	AreaProfilesRoutesEnabled           bool          `envconfig:"AREA_PROFILE_ROUTES_ENABLED"`
	InteractivesControllerURL           string        `envconfig:"INTERACTIVES_CONTROLLER_URL"`
	InteractivesRoutesEnabled           bool          `envconfig:"INTERACTIVES_ROUTES_ENABLED"`
	FilterFlexDatasetServiceURL         string        `envconfig:"FILTER_FLEX_DATASET_SERVICE_URL"`
	FilterFlexRoutesEnabled             bool          `envconfig:"FILTER_FLEX_ROUTES_ENABLED"`
	CensusAtlasURL                      string        `envconfig:"CENSUS_ATLAS_URL"`
	CensusAtlasRoutesEnabled            bool          `envconfig:"CENSUS_ATLAS_ROUTES_ENABLED"`
	PatternLibraryAssetsPath            string        `envconfig:"PATTERN_LIBRARY_ASSETS_PATH"`
	SiteDomain                          string        `envconfig:"SITE_DOMAIN"`
	RedirectSecret                      string        `envconfig:"REDIRECT_SECRET" json:"-"`
	SQSAnalyticsURL                     string        `envconfig:"SQS_ANALYTICS_URL"`
	ContentTypeByteLimit                int           `envconfig:"CONTENT_TYPE_BYTE_LIMIT"`
	HealthcheckCriticalTimeout          time.Duration `envconfig:"HEALTHCHECK_CRITICAL_TIMEOUT"`
	HealthcheckInterval                 time.Duration `envconfig:"HEALTHCHECK_INTERVAL"`
	ZebedeeRequestMaximumTimeoutSeconds time.Duration `envconfig:"ZEBEDEE_REQUEST_TIMEOUT_SECONDS"`
	ZebedeeRequestMaximumRetries        int           `envconfig:"ZEBEDEE_REQUEST_MAXIMUM_RETRIES"`
	EnableSearchABTest                  bool          `envconfig:"ENABLE_SEARCH_AB_TEST"`
	SearchABTestPercentage              int           `envconfig:"SEARCH_AB_TEST_PERCENTAGE"`
	CensusHubRoutesEnabled              bool          `envconfig:"CENSUS_HUB_ROUTES_ENABLED"`
	ProxyTimeout                        time.Duration `envconfig:"PROXY_TIMEOUT"`
}

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