summaryrefslogtreecommitdiff
path: root/plugins/informer/interface.go
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/informer/interface.go')
-rw-r--r--plugins/informer/interface.go11
1 files changed, 11 insertions, 0 deletions
diff --git a/plugins/informer/interface.go b/plugins/informer/interface.go
index 45f44691..316c7bc1 100644
--- a/plugins/informer/interface.go
+++ b/plugins/informer/interface.go
@@ -4,7 +4,18 @@ import (
"github.com/spiral/roadrunner/v2/pkg/process"
)
+/*
+Informer plugin should not receive any other plugin in the Init or via Collects
+Because Availabler implementation should present in every plugin
+*/
+
// Informer used to get workers from particular plugin or set of plugins
type Informer interface {
Workers() []process.State
}
+
+// Availabler interface should be implemented by every plugin which wish to report to the PHP worker that it available in the RR runtime
+type Availabler interface {
+ // Available method needed to collect all plugins which are available in the runtime.
+ Available()
+}