diff options
author | Wolfy-J <[email protected]> | 2019-05-04 19:24:25 +0300 |
---|---|---|
committer | Wolfy-J <[email protected]> | 2019-05-04 19:24:25 +0300 |
commit | 2efc533f2aac215d487a80020b0f9bf4ae5209c3 (patch) | |
tree | a80a7a74dc4ca8c290b8b1bf1f6d24535b5ae3d7 /service/watcher/config.go | |
parent | 726b31008e73ab83d0582305c28a8cf62322e47a (diff) |
watchers renamed to controllers
Diffstat (limited to 'service/watcher/config.go')
-rw-r--r-- | service/watcher/config.go | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/service/watcher/config.go b/service/watcher/config.go index 74be517a..8151005d 100644 --- a/service/watcher/config.go +++ b/service/watcher/config.go @@ -8,11 +8,11 @@ import ( // Configures set of Services. type Config struct { - // Interval defines the update duration for underlying watchers, default 1s. + // Interval defines the update duration for underlying controllers, default 1s. Interval time.Duration // Services declares list of services to be watched. - Services map[string]*watcherConfig + Services map[string]*controllerConfig } // Hydrate must populate Config values using given Config source. Must return error if Config is not valid. @@ -36,13 +36,13 @@ func (c *Config) InitDefaults() error { return nil } -// Watchers returns list of defined Services -func (c *Config) Watchers(l listener) (watchers map[string]roadrunner.Watcher) { - watchers = make(map[string]roadrunner.Watcher) +// Controllers returns list of defined Services +func (c *Config) Controllers(l listener) (controllers map[string]roadrunner.Controller) { + controllers = make(map[string]roadrunner.Controller) for name, cfg := range c.Services { - watchers[name] = &watcher{lsn: l, tick: c.Interval, cfg: cfg} + controllers[name] = &controller{lsn: l, tick: c.Interval, cfg: cfg} } - return watchers + return controllers } |