Documentation
¶
Overview ¶
Package config ...
Package config contains build configuration
Index ¶
Constants ¶
View Source
const ( // AES256BitKeySize is the size (bytes) of a 256-bit key. AES256BitKeySize = 2 * aes.BlockSize )
View Source
const Debug = false
Debug indicates if the current build is a debug build.
Variables ¶
View Source
var ( // TelemetryURL Everest telemetry endpoint. The variable is set for the release builds via ldflags // to have the correct default telemetry url. TelemetryURL string // TelemetryInterval Everest telemetry sending frequency. The variable is set for the release builds via ldflags // to have the correct default telemetry interval. TelemetryInterval string )
Functions ¶
This section is empty.
Types ¶
type EverestConfig ¶
type EverestConfig struct {
DSN string `default:"postgres://admin:pwd@127.0.0.1:5432/postgres?sslmode=disable" envconfig:"DSN"`
// DEPRECATED: Use ListenPort instead.
HTTPPort int `envconfig:"HTTP_PORT"`
ListenPort int `default:"8080" envconfig:"PORT"`
Verbose bool `default:"false" envconfig:"VERBOSE"`
// TelemetryURL Everest telemetry endpoint.
TelemetryURL string `envconfig:"TELEMETRY_URL"`
// TelemetryInterval Everest telemetry sending frequency.
TelemetryInterval string `envconfig:"TELEMETRY_INTERVAL"`
// DisableTelemetry disable Everest and the upstream operators telemetry
DisableTelemetry bool `default:"false" envconfig:"DISABLE_TELEMETRY"`
// APIRequestsRateLimit allowed amount of API requests per second
APIRequestsRateLimit int `default:"100" envconfig:"API_REQUESTS_RATE_LIMIT"`
// CreateSessionRateLimit allowed amount of API requests per second to the /session method
CreateSessionRateLimit int `default:"1" envconfig:"CREATE_SESSION_RATE_LIMIT"`
// VersionServiceURL contains the URL of the version service.
VersionServiceURL string `default:"https://check.percona.com" envconfig:"VERSION_SERVICE_URL"`
// TLSCertsPath contains the path to the directory with the TLS certificates.
// Setting this will enable HTTPS on ListenPort.
TLSCertsPath string `envconfig:"TLS_CERTS_PATH"`
}
EverestConfig stores the configuration for the application.
func ParseConfig ¶
func ParseConfig() (*EverestConfig, error)
ParseConfig parses env vars and fills EverestConfig.
Click to show internal directories.
Click to hide internal directories.