mirror of
				https://github.com/go-micro/go-micro.git
				synced 2025-10-30 23:27:41 +02:00 
			
		
		
		
	Add options to config (#1450)
This commit is contained in:
		| @@ -16,6 +16,8 @@ type Config interface { | |||||||
| 	reader.Values | 	reader.Values | ||||||
| 	// Init the config | 	// Init the config | ||||||
| 	Init(opts ...Option) error | 	Init(opts ...Option) error | ||||||
|  | 	// Options in the config | ||||||
|  | 	Options() Options | ||||||
| 	// Stop the config loader/watcher | 	// Stop the config loader/watcher | ||||||
| 	Close() error | 	Close() error | ||||||
| 	// Load config sources | 	// Load config sources | ||||||
|   | |||||||
| @@ -67,6 +67,10 @@ func (c *config) Init(opts ...Option) error { | |||||||
| 	return nil | 	return nil | ||||||
| } | } | ||||||
|  |  | ||||||
|  | func (c *config) Options() Options { | ||||||
|  | 	return c.opts | ||||||
|  | } | ||||||
|  |  | ||||||
| func (c *config) run() { | func (c *config) run() { | ||||||
| 	watch := func(w loader.Watcher) error { | 	watch := func(w loader.Watcher) error { | ||||||
| 		for { | 		for { | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user