Plugins: Separate manager read/write components (#50313)

* separate manager read/write

* guarantee consistency in test
This commit is contained in:
Will Browne
2022-06-07 17:51:00 +02:00
committed by GitHub
parent aa74371008
commit f7cce28cdf
5 changed files with 15 additions and 3 deletions
+3
View File
@@ -15,6 +15,9 @@ type Store interface {
Plugin(ctx context.Context, pluginID string) (PluginDTO, bool)
// Plugins returns plugins by their requested type.
Plugins(ctx context.Context, pluginTypes ...Type) []PluginDTO
}
type Manager interface {
// Add adds a plugin to the store.
Add(ctx context.Context, pluginID, version string) error
// Remove removes a plugin from the store.