config

package
v1.17.1 Latest Latest
Warning

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

Go to latest
Published: Nov 13, 2026 License: Apache-2.0 Imports: 3 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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"`
	// CreateSSOSessionRateLimit allowed amount of API requests per second per client IP to the /session/sso method.
	// It is looser than CreateSessionRateLimit: every open tab renews its SSO session, and users behind one NAT share an IP.
	CreateSSOSessionRateLimit int `default:"10" envconfig:"CREATE_SSO_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.

Jump to

Keyboard shortcuts

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