-
Notifications
You must be signed in to change notification settings - Fork 54
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #45 from lalamove/feature/max-watcher-panics
Add recovery on panics in watcher and add a MaxWatcherPanics setting
- Loading branch information
Showing
10 changed files
with
217 additions
and
63 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -35,4 +35,4 @@ | |
|
||
[[constraint]] | ||
name = "github.com/lalamove/nui" | ||
version = "~0.1.0" | ||
version = "~0.2.0" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
// Package konfig provides a composable, observable and performant | ||
// config handling for Go. | ||
// Written for larger distributed systems where you may have plenty of | ||
// configuration sources - it allows you to compose configurations from | ||
// multiple sources with reload hooks making it simple to build apps that live | ||
// in a highly dynamic environment. | ||
// | ||
// Konfig is built around 4 small interfaces: Loader, Watcher, Parser, Closer | ||
// | ||
// Get started: | ||
// var configFiles = []klfile.File{ | ||
// { | ||
// Path: "./config.json", | ||
// Parser: kpjson.Parser, | ||
// }, | ||
// } | ||
// | ||
// func init() { | ||
// konfig.Init(konfig.DefaultConfig()) | ||
// } | ||
// | ||
// func main() { | ||
// // load from json file with a file wacher | ||
// konfig.RegisterLoaderWatcher( | ||
// klfile.New(&klfile.Config{ | ||
// Files: configFiles, | ||
// Watch: true, | ||
// }), | ||
// // optionally you can pass config hooks to run when a file is changed | ||
// func(c konfig.Store) error { | ||
// return nil | ||
// }, | ||
// ) | ||
// | ||
// // Load and start watching | ||
// if err := konfig.LoadWatch(); err != nil { | ||
// log.Fatal(err) | ||
// } | ||
// | ||
// // retrieve value from config file | ||
// konfig.Bool("debug") | ||
// } | ||
// | ||
// | ||
package konfig |
Oops, something went wrong.