github.com/bigcommerce/nomad@v0.9.3-bc/client/pluginmanager/manager.go (about) 1 package pluginmanager 2 3 import "context" 4 5 // PluginManager orchestrates the lifecycle of a set of plugins 6 type PluginManager interface { 7 // Run starts a plugin manager and should return early 8 Run() 9 10 // Shutdown should gracefully shutdown all plugins managed by the manager. 11 // It must block until shutdown is complete 12 Shutdown() 13 14 // PluginType is the type of plugin which the manager manages 15 PluginType() string 16 } 17 18 // FingerprintingPluginManager is an interface that exposes fingerprinting 19 // coordination for plugin managers 20 type FingerprintingPluginManager interface { 21 PluginManager 22 23 // WaitForFirstFingerprint returns a channel that is closed once all plugin 24 // instances managed by the plugin manager have fingerprinted once. A 25 // context can be passed which when done will also close the channel 26 WaitForFirstFingerprint(context.Context) <-chan struct{} 27 }