Documentation
¶
Overview ¶
Package configcheck holds the checks both daemons apply to their configuration file before they open storage, bind listeners or acquire a packet counter. Every error names the configuration key that is wrong, so an operator can correct the file without reading a stack trace.
Index ¶
- func Endpoint(field, endpoint string) error
- func File(field, path string) error
- func Host(field, host string) error
- func Label(field, value string, maximum int) error
- func LogLevel(field, level string) error
- func Milliseconds(field string, value int64) error
- func Origin(field, origin string) error
- func Path(field, path string) error
- func Port(field string, port int) error
- func Seconds(field string, value int64) error
- type Document
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func File ¶
File checks a path that must already hold a regular file, such as a certificate the daemon reads at startup.
func LogLevel ¶
LogLevel checks a level name the logging subsystem accepts, so that a misspelled level fails instead of quietly falling back to info.
func Milliseconds ¶
Milliseconds is Seconds for a field documented in milliseconds.
func Origin ¶
Origin checks a browser origin: a scheme, a host and an optional port, with no path, query, fragment or credentials.
Types ¶
type Document ¶
type Document struct {
// contains filtered or unexported fields
}
Document records which keys a configuration file actually sets. Daemons use it to keep a documented default for an omitted key while still rejecting an explicit value that is out of range.