Documentation
¶
Overview ¶
Package config contains CLI configuration components.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BackendMap ¶
BackendMap matches incoming principals to database connection configurations.
type Cache ¶
type Cache struct {
*Config
Backends BackendMap
Discovery *url.URL
PublicKeys []crypto.PublicKey
TLSConfig *tls.Config
}
A Cache wraps a Config to save expensive computations and network fetching. Configuration reloading can be accomplished by simply discarding and recreating the Cache.
type Config ¶
type Config struct {
BindAddr string // Address to bind the proxy to.
GracePeriod time.Duration // The amount of time to wait for open connections to drain.
JwtField string // The JWT claim field to use when selecting a backend.
MetricsAddr string // Address to bind the prometheus metrics server to.
Refresh time.Duration // Duration between refreshing configuration data.
ReportRemoteAddr bool // If true, add a crdb:remote_addr connection param.
// contains filtered or unexported fields
}
Config encapsulates the command-line configurations and the logic necessary to make those values usable.
Click to show internal directories.
Click to hide internal directories.