summaryrefslogtreecommitdiff
path: root/watcher.go
diff options
context:
space:
mode:
authorWolfy-J <[email protected]>2019-05-02 17:17:16 +0300
committerWolfy-J <[email protected]>2019-05-02 17:17:16 +0300
commit7bd5da5327e0d6f602627006d55cf803b8c4a4c7 (patch)
tree2e76fba4b391e2733a6e59c8149bb22f6c91dfbc /watcher.go
parent859441b4d084babca70266bd23ceb2a95269b3ff (diff)
fixing tests
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)
+}