-
koanf
Simple, extremely lightweight, extensible, configuration management library for Go. Support for JSON, TOML, YAML, env, command line, file, S3 etc. Alternative to viper.
-
InfluxDB
Power Real-Time Data Analytics at Scale. Get real-time insights from all types of time series data with InfluxDB. Ingest, query, and analyze billions of data points in real-time with unbounded cardinality.
Is there any lib to init the app (read config from yaml, db.. ) and control it's gracefully shutdown? I found this one https://github.com/iv-menshenin/appctl - which doesn't have init thing, but instead has ping service. Was wondering are there any de facto standard libs to do that ?
For configuration, I like Koanf.
I’m not sure of much that can do all of that - maybe it’s a use case for https://github.com/uber-go/fx
What I’ve done in the past is use a run group (like https://github.com/oklog/run ) and one of the goroutines in the group is just listening for a SIGINT/SIGTERM/etc. When it sees that it throws an error which cancels the root context and let’s each component handle its own graceful shutdown