Documentation
¶
Overview ¶
Package file implements provider.Provider for local file-based configuration. It watches a file for changes using fsnotify (fsevents on macOS, inotify on Linux) and re-reads the file on every change, calling compare-and-swap on dynamic values. Supports JSON and YAML flat key:value formats (not nested).
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct {
// Path is the path to the configuration file.
Path string
// Format specifies how to parse the file. Default: FormatAuto.
Format Format
}
Config holds file-specific configuration.
type Provider ¶
type Provider struct {
// contains filtered or unexported fields
}
Provider implements the poya Provider interface using file watching.
Click to show internal directories.
Click to hide internal directories.