Documentation
¶
Overview ¶
Package serverconfig loads a kukeond ServerConfiguration document from disk. Used by `kukeond --configuration` (daemon root command) and `kuke init --server-configuration` to feed defaults into viper before the daemon starts. An absent file returns a zero-value document so the caller can fall back to its existing defaults without an error.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Load ¶
func Load(path string) (*v1beta1.ServerConfigurationDoc, error)
Load reads path and returns the parsed ServerConfiguration. When the file does not exist, returns a zero-value document and no error — the absent case is normal (callers fall back to hardcoded defaults). Any other read or parse failure is wrapped with errdefs.ErrServerConfigurationInvalid.
func WriteDefault ¶
WriteDefault writes the commented default ServerConfiguration to path when the file is absent. Returns true only when this call created the file; an existing file (any contents) is left untouched, satisfying the "first-write only" rule. Creates the parent directory if missing. Any other failure is returned wrapped.
Types ¶
This section is empty.