diff options
author | Wolfy-J <[email protected]> | 2019-05-02 22:52:32 +0300 |
---|---|---|
committer | Wolfy-J <[email protected]> | 2019-05-02 22:52:32 +0300 |
commit | 62250fde949d2511b1e030c570bafe2ef3ed2c2d (patch) | |
tree | 538a0efeefe7f92e489096850f087b15d6fee8ea | |
parent | e3f8f80b40d55d9d3c2e858a73cc1befe3f04114 (diff) |
symfony way to refernce contributors
-rw-r--r-- | service/watcher/watcher.go (renamed from service/watchdog/watcher.go) | 12 | ||||
-rw-r--r-- | watcher.go | 6 |
2 files changed, 12 insertions, 6 deletions
diff --git a/service/watchdog/watcher.go b/service/watcher/watcher.go index c8c4b3f2..9cf129df 100644 --- a/service/watchdog/watcher.go +++ b/service/watcher/watcher.go @@ -1,4 +1,4 @@ -package watchdog +package watcher import ( "log" @@ -6,7 +6,7 @@ import ( ) // disconnect?? -type Watcher struct { +type Service struct { // defines how often interval time.Duration pool Pool @@ -15,8 +15,8 @@ type Watcher struct { } // NewWatcher creates new pool watcher. -func NewWatcher(p Pool, i time.Duration) *Watcher { - w := &Watcher{ +func NewWatcher(p Pool, i time.Duration) *Service { + w := &Service{ interval: i, pool: p, stop: make(chan interface{}), @@ -38,11 +38,11 @@ func NewWatcher(p Pool, i time.Duration) *Watcher { return w } -func (w *Watcher) Stop() { +func (w *Service) Stop() { close(w.stop) } -func (w *Watcher) update() { +func (w *Service) update() { for _, w := range w.pool.Workers() { log.Println(w) diff --git a/watcher.go b/watcher.go new file mode 100644 index 00000000..7d9c6060 --- /dev/null +++ b/watcher.go @@ -0,0 +1,6 @@ +package roadrunner + +// disconnect?? +type Watcher interface { + // ?? lock on pool +} |