mirror of
https://github.com/kemko/nomad.git
synced 2026-01-06 02:15:43 +03:00
Set AgentShutdown
This commit is contained in:
@@ -430,6 +430,7 @@ func (a *Agent) finalizeServerConfig(c *nomad.Config) {
|
||||
// Setup the plugin loaders
|
||||
c.PluginLoader = a.pluginLoader
|
||||
c.PluginSingletonLoader = a.pluginSingletonLoader
|
||||
c.AgentShutdown = func() error { return a.Shutdown() }
|
||||
}
|
||||
|
||||
// clientConfig is used to generate a new client configuration struct for
|
||||
|
||||
@@ -351,6 +351,10 @@ type Config struct {
|
||||
|
||||
// LicenseConfig is a tunable knob for enterprise license testing.
|
||||
LicenseConfig *LicenseConfig
|
||||
|
||||
// AgentShutdown is used to call agent.Shutdown from the context of a Server
|
||||
// It is used primarily for licensing
|
||||
AgentShutdown func() error
|
||||
}
|
||||
|
||||
// CheckVersion is used to check if the ProtocolVersion is valid
|
||||
|
||||
Reference in New Issue
Block a user