mirror of
https://github.com/kemko/nomad.git
synced 2026-01-01 16:05:42 +03:00
The driver manager is modeled after the device manager and is started by the client. It's responsible for handling driver lifecycle and reattachment state, as well as processing the incomming fingerprint and task events from each driver. The mananger exposes a method for registering event handlers for task events that is used by the task runner to update the server when a task has been updated with an event. Since driver fingerprinting has been implemented by the driver manager, it is no longer needed in the fingerprint mananger and has been removed.
19 lines
532 B
Go
19 lines
532 B
Go
package pluginmanager
|
|
|
|
// PluginManager orchestrates the lifecycle of a set of plugins
|
|
type PluginManager interface {
|
|
// Run starts a plugin manager and must block until shutdown
|
|
Run()
|
|
|
|
// Ready returns a channel that blocks until the plugin mananger has
|
|
// initialized all plugins
|
|
Ready() <-chan struct{}
|
|
|
|
// Shutdown should gracefully shutdown all plugins managed by the manager.
|
|
// It must block until shutdown is complete
|
|
Shutdown()
|
|
|
|
// PluginType is the type of plugin which the manager manages
|
|
PluginType() string
|
|
}
|