diff options
author | Wolfy-J <[email protected]> | 2019-05-02 17:30:43 +0300 |
---|---|---|
committer | Wolfy-J <[email protected]> | 2019-05-02 17:30:43 +0300 |
commit | 8fc464213c471ad79be88d9926d8f45b66a23ec0 (patch) | |
tree | 4072167f6ca3a2d4bd9ed56ff9c017c8ed79e16a /watcher.go | |
parent | a482d49122d92dd1cd82881ed221c55e5210e536 (diff) |
removing workers in runtime
Diffstat (limited to 'watcher.go')
-rw-r--r-- | watcher.go | 14 |
1 files changed, 14 insertions, 0 deletions
@@ -1,8 +1,22 @@ package roadrunner +import ( + "sync" + "time" +) + // Watcher watches for workers. type Watcher interface { // Keep must return true and nil if worker is OK to continue working, // must return false and optional error to force worker destruction. Keep(p Pool, w *Worker) (keep bool, err error) } + +// disconnect?? +type LazyWatcher struct { + // defines how often + interval time.Duration + + mu sync.Mutex + p Pool +} |