Documentation
¶
Index ¶
- Variables
- func CacheControlAutoEnabled(c config.CacheControlConfig) bool
- func CacheControlEnabled(c config.CacheControlConfig) bool
- func DecodeEntityConfig(rawConfig map[string]interface{}, out any) error
- func EffectiveShutdownTimeout(c config.ServerConfig) uint
- func LoadAndWatchConfigFromFile(filename string, onReload func(config.Config, error)) (config.Config, error)
- func LoadConfig(raw string) (config.Config, error)
- func LoadConfigFromFile(filename string) (config.Config, error)
- func LoadConfigFromRemote(provider, endpoint, path, format string) (config.Config, error)
- func MergeCacheControlDefaults(c *config.CacheControlConfig, other config.CacheControlConfig)
- func MergeClientDefaults(c *config.ClientConfig, o config.ClientConfig)
- func ReplaceConfigValues(rawConfig map[string]interface{}, keyTag string, ...) (map[string]interface{}, error)
- func ReplaceEnv(rawConfig map[string]interface{}) map[string]interface{}
- func Validate(c config.Config) error
- type ConfigWithID
Constants ¶
This section is empty.
Variables ¶
View Source
var CustomLogLevel = map[string]slog.Level{ "trace": config.LevelTrace, "absurd": config.LevelAbsurd, }
Functions ¶
func CacheControlAutoEnabled ¶
func CacheControlAutoEnabled(c config.CacheControlConfig) bool
func CacheControlEnabled ¶
func CacheControlEnabled(c config.CacheControlConfig) bool
func DecodeEntityConfig ¶
Errors on unknown keys so a typo can't silently revert a security control. "id" stays since datastore declares it
func EffectiveShutdownTimeout ¶
func EffectiveShutdownTimeout(c config.ServerConfig) uint
When unset, covers both the drain wait and a full-length request so the budget always fits its work
func LoadConfigFromRemote ¶
func MergeCacheControlDefaults ¶
func MergeCacheControlDefaults(c *config.CacheControlConfig, other config.CacheControlConfig)
func MergeClientDefaults ¶
func MergeClientDefaults(c *config.ClientConfig, o config.ClientConfig)
func ReplaceConfigValues ¶
func ReplaceConfigValues(rawConfig map[string]interface{}, keyTag string, replacer func(string) (string, error)) (map[string]interface{}, error)
Replaces any string value starting with `keyTag.keyName` with replacer(keyName), so secrets stay out of source-controlled config
func ReplaceEnv ¶
Replaces any string value starting with `env.` with that environment variable, so secrets stay out of source-controlled config
Types ¶
type ConfigWithID ¶
func NormalizeCaches ¶
func NormalizeCaches(raw interface{}, errorMessages config.ErrorMessages) ([]ConfigWithID, error)
Normalizes the top-level cache config into a list with IDs
Click to show internal directories.
Click to hide internal directories.