diff options
author | Valery Piashchynski <[email protected]> | 2021-04-30 11:44:07 +0300 |
---|---|---|
committer | Valery Piashchynski <[email protected]> | 2021-04-30 11:44:07 +0300 |
commit | 50aa751dcefc0ab0e96594a5f111ead316a34a70 (patch) | |
tree | 5cf1fd278e01e1bd23a3f39d408ceb49741c448c /plugins/informer/interface.go | |
parent | 65015a3d3f4b387675b5ca005b8831a6be9e15aa (diff) |
- Update Lister implementation
Signed-off-by: Valery Piashchynski <[email protected]>
Diffstat (limited to 'plugins/informer/interface.go')
-rw-r--r-- | plugins/informer/interface.go | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/plugins/informer/interface.go b/plugins/informer/interface.go index cd8ab232..08eda00b 100644 --- a/plugins/informer/interface.go +++ b/plugins/informer/interface.go @@ -4,13 +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 } -// Lister interface used to filter available plugins -type Lister interface { - // List gets no args, but returns list of the active plugins - List() []string +// 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 returns true if the particular plugin available in the RR2 runtime + Available() bool } |