Skip to content

Commit

Permalink
Add options to config (micro#1450)
Browse files Browse the repository at this point in the history
  • Loading branch information
asim committed Mar 31, 2020
1 parent 2674790 commit 6c6c535
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
2 changes: 2 additions & 0 deletions config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ type Config interface {
reader.Values
// Init the config
Init(opts ...Option) error
// Options in the config
Options() Options
// Stop the config loader/watcher
Close() error
// Load config sources
Expand Down
4 changes: 4 additions & 0 deletions config/default.go
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,10 @@ func (c *config) Init(opts ...Option) error {
return nil
}

func (c *config) Options() Options {
return c.opts
}

func (c *config) run() {
watch := func(w loader.Watcher) error {
for {
Expand Down

0 comments on commit 6c6c535

Please sign in to comment.