Plugins: Add termination stage to plugin loader pipeline (#72822)

* add termination stage

* uid -> pluginID (for now)

* also fix fakes

* add simple test

* Fix logger name

Co-authored-by: Giuseppe Guerra <giuseppe.guerra@grafana.com>

* inline stop func call

Co-authored-by: Giuseppe Guerra <giuseppe.guerra@grafana.com>

---------

Co-authored-by: Giuseppe Guerra <giuseppe.guerra@grafana.com>
This commit is contained in:
Will Browne
2023-08-04 11:57:49 +02:00
committed by GitHub
co-authored by Giuseppe Guerra
parent 7bc6d32eb9
commit 60b4a0b2a4
19 changed files with 305 additions and 62 deletions
+2 -2
View File
@@ -5,7 +5,7 @@
// Discovery: Find plugins (e.g. from disk, remote, etc.), and [optionally] filter the results based on some criteria.
// Bootstrap: Create the plugins found in the discovery stage and enrich them with metadata.
// Verification: Verify the plugins based on some criteria (e.g. signature validation, angular detection, etc.)
// Initialization: Initialize the plugin for use (e.g. register with Grafana, etc.)
// Post-Initialization: Perform any post-initialization tasks (e.g. start the backend process, declare RBAC roles etc.)
// Initialization: Initialize the plugin for use (e.g. register with Grafana, start the backend process, declare RBAC roles etc.)
// - Termination: Terminate the plugin (e.g. stop the backend process, cleanup, etc.)
package pipeline