Documentation
¶
Overview ¶
Example: File provider
Prerequisites:
Create a config file (JSON or YAML) in the current directory:
echo '{"timeout":"30s","verbose":true,"max_conn":100}' > /tmp/config.json
// or for YAML: cat > /tmp/config.yaml <<'YAML' timeout: 30s verbose: true max_conn: 100 YAML
Update the path below to point to your file.
Run: go run examples/file/main.go
In another terminal, edit the file: echo '{"timeout":"60s","verbose":false,"max_conn":200}' > /tmp/config.json Watch the output — the update is reflected almost instantly.
Click to show internal directories.
Click to hide internal directories.