diff options
author | Valery Piashchynski <[email protected]> | 2020-02-20 14:14:11 +0300 |
---|---|---|
committer | Valery Piashchynski <[email protected]> | 2020-02-20 14:14:11 +0300 |
commit | 2efcfeb89861ba981f980bb4503c31ca6c7a92e0 (patch) | |
tree | 22269a5cecc888cd26d6b1bd8477f30ea604ba21 /service/reload/config.go | |
parent | ec7975355a8acea632e5c9b7e912b3e9ad6907ca (diff) |
Declare general interfaces, Controllable and Attacher instead of private
First dirty working example of reload
Diffstat (limited to 'service/reload/config.go')
-rw-r--r-- | service/reload/config.go | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/service/reload/config.go b/service/reload/config.go index fb704015..f684a227 100644 --- a/service/reload/config.go +++ b/service/reload/config.go @@ -1,6 +1,9 @@ package reload -import "github.com/spiral/roadrunner/service" +import ( + "github.com/spiral/roadrunner" + "github.com/spiral/roadrunner/service" +) // Config is a Reload configuration point. type Config struct { @@ -20,11 +23,13 @@ type ServiceConfig struct { // Patterns is per-service specific files to watch Patterns []string // Dirs is per-service specific dirs which will be combined with Patterns - Dirs []string + Dirs []string // Ignore is set of files which would not be watched Ignore []string -} + // service is a link to service to restart + service *roadrunner.Controllable +} // Hydrate must populate Config values using given Config source. Must return error if Config is not valid. func (c *Config) Hydrate(cfg service.Config) error { @@ -40,4 +45,3 @@ func (c *Config) InitDefaults() error { return nil } - |