summaryrefslogtreecommitdiff
path: root/watcher.go
diff options
context:
space:
mode:
Diffstat (limited to 'watcher.go')
-rw-r--r--watcher.go14
1 files changed, 14 insertions, 0 deletions
diff --git a/watcher.go b/watcher.go
index bbc7b9dc..05b8a659 100644
--- a/watcher.go
+++ b/watcher.go
@@ -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
+}