diff options
author | Valery Piashchynski <[email protected]> | 2021-08-14 20:29:10 +0300 |
---|---|---|
committer | Valery Piashchynski <[email protected]> | 2021-08-14 20:29:10 +0300 |
commit | 5a56dc33b9903e9d96e7c87067bd273ad2e68f8a (patch) | |
tree | aa5e6020d18fd42ee29ac3cf62ad41d4f18795c4 /plugins/informer/interface.go | |
parent | 6860326fa5d8f37f6e954da07fd53b9261731227 (diff) |
Update broadcast tests, add redis flusing. Initial impl of the job
drivers state.
Signed-off-by: Valery Piashchynski <[email protected]>
Diffstat (limited to 'plugins/informer/interface.go')
-rw-r--r-- | plugins/informer/interface.go | 19 |
1 files changed, 14 insertions, 5 deletions
diff --git a/plugins/informer/interface.go b/plugins/informer/interface.go index bbc1a048..9277b85b 100644 --- a/plugins/informer/interface.go +++ b/plugins/informer/interface.go @@ -1,7 +1,10 @@ package informer import ( - "github.com/spiral/roadrunner/v2/pkg/process" + "context" + + "github.com/spiral/roadrunner/v2/pkg/state/job" + "github.com/spiral/roadrunner/v2/pkg/state/process" ) /* @@ -9,17 +12,23 @@ Informer plugin should not receive any other plugin in the Init or via Collects Because Availabler implementation should present in every plugin */ +// Statistic interfaces ============== + // Informer used to get workers from particular plugin or set of plugins type Informer interface { Workers() []*process.State } +// JobsStat interface provide statistic for the jobs plugin +type JobsStat interface { + // JobsState returns slice with the attached drivers information + JobsState(ctx context.Context) ([]*job.State, error) +} + +// Statistic interfaces end ============ + // 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() } - -type JobsStat interface { - Stat() -} |