summaryrefslogtreecommitdiff
path: root/watcher.go
diff options
context:
space:
mode:
Diffstat (limited to 'watcher.go')
-rw-r--r--watcher.go8
1 files changed, 8 insertions, 0 deletions
diff --git a/watcher.go b/watcher.go
new file mode 100644
index 00000000..bbc7b9dc
--- /dev/null
+++ b/watcher.go
@@ -0,0 +1,8 @@
+package roadrunner
+
+// 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)
+}