{"modulePath":"github.com/anth0d/nomad","version":"v0.0.0-20221214183521-ae3a0a2cad06","isLatest":true,"isStandardLibrary":false,"goos":"all","goarch":"all","docs":"# package pluginmanager\n\n## Types\n\n```go\ntype FingerprintingPluginManager interface {\n\tPluginManager\n\n\t// WaitForFirstFingerprint returns a channel that is closed once all plugin\n\t// instances managed by the plugin manager have fingerprinted once. A\n\t// context can be passed which when done will also close the channel\n\tWaitForFirstFingerprint(context.Context) \u003c-chan struct{}\n}\n```\nFingerprintingPluginManager is an interface that exposes fingerprinting coordination for plugin managers\n\n```go\ntype MockPluginManager struct {\n\tRunF                      func()\n\tShutdownF                 func()\n\tWaitForFirstFingerprintCh \u003c-chan struct{}\n}\n```\n\n```go\nfunc (m *MockPluginManager) PluginType() string\n```\n\n```go\nfunc (m *MockPluginManager) Run()\n```\n\n```go\nfunc (m *MockPluginManager) Shutdown()\n```\n\n```go\nfunc (m *MockPluginManager) WaitForFirstFingerprint(ctx context.Context) \u003c-chan struct{}\n```\n\n```go\ntype PluginGroup struct {\n\t// contains filtered or unexported fields\n}\n```\nPluginGroup is a utility struct to manage a collectively orchestrate a set of PluginManagers\n\n```go\nfunc New(logger log.Logger) *PluginGroup\n```\nNew returns an initialized PluginGroup\n\n```go\nfunc (m *PluginGroup) RegisterAndRun(manager PluginManager) error\n```\nRegisterAndRun registers the manager and starts it in a separate goroutine\n\n```go\nfunc (m *PluginGroup) Shutdown()\n```\nShutdown shutsdown all registered PluginManagers in reverse order of how they were started.\n\n```go\nfunc (m *PluginGroup) WaitForFirstFingerprint(ctx context.Context) (\u003c-chan struct{}, error)\n```\nWaitForFirstFingerprint returns a channel which will be closed once all plugin managers are ready. A timeout for waiting on each manager is given\n\n```go\ntype PluginManager interface {\n\t// Run starts a plugin manager and should return early\n\tRun()\n\n\t// Shutdown should gracefully shutdown all plugins managed by the manager.\n\t// It must block until shutdown is complete\n\tShutdown()\n\n\t// PluginType is the type of plugin which the manager manages\n\tPluginType() string\n}\n```\nPluginManager orchestrates the lifecycle of a set of plugins\n\n","path":"github.com/anth0d/nomad/client/pluginmanager","name":"pluginmanager","synopsis":"","isRedistributable":true}
