A layer-based, pluggable configuration manager for Go applications with minimal dependencies.
Onion is a layer-based, pluggable configuration management library for Go that organizes settings into prioritized layers, allowing flexible and dynamic loading from multiple sources like files, environment variables, and remote stores. It solves the problem of managing complex configuration setups by enabling developers to combine and override settings across different sources, with support for live updates and encryption.
Go developers building applications that require dynamic, multi-source configuration management, such as microservices, cloud-native apps, or systems needing secure and live-reloadable settings.
Developers choose Onion for its minimal dependency approach, where only required loaders are included, keeping applications lightweight, and its unique layered architecture that supports live reloading and encrypted configurations for sensitive data.
Layer based configuration for golang
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
Onion's philosophy ensures only required loaders are imported, keeping applications lightweight and focused, as emphasized in the Goals section to avoid unnecessary bloat.
The layered system allows combining multiple sources like files and environment variables with clear override rules, enabling environment-specific settings through priority-based configuration.
Supports dynamic configuration updates via file and etcd watchers, allowing changes without application restarts, which is crucial for cloud-native apps and microservices.
Provides encrypted configuration storage using secconf with PGP and base64 encoding, with a CLI tool (onioncli) for key management, enhancing security for sensitive data.
Only supports secconf encryption with PGP, lacking alternatives like AES or integration with cloud KMS, which may not meet all security or compliance requirements.
The README marks the current version as work in progress with older versions in separate branches, potentially leading to breaking changes or migration challenges for production use.
Live reloading and remote configuration are limited to etcd and file layers, with no built-in support for other popular stores like Consul or AWS Parameter Store, reducing flexibility.
Requires blank imports for non-JSON formats (e.g., YAML, TOML), adding setup complexity compared to libraries with built-in multi-format support out of the box.