Documentation
¶
Overview ¶
Package management provides plugin lifecycle management functionality This package can be used by Hockeypuck and other servers for plugin management
Index ¶
- type ActiveRequest
- type PluginManager
- func (pm *PluginManager) GetPluginStatus() map[string]interface{}
- func (pm *PluginManager) GetPluginsHealth() map[string]interface{}
- func (pm *PluginManager) GetPluginsList() []map[string]interface{}
- func (pm *PluginManager) HandleConfig(w http.ResponseWriter, r *http.Request, ps httprouter.Params)
- func (pm *PluginManager) HandleConfigUpdate(w http.ResponseWriter, r *http.Request, ps httprouter.Params)
- func (pm *PluginManager) HandleHealth(w http.ResponseWriter, r *http.Request, ps httprouter.Params)
- func (pm *PluginManager) HandleList(w http.ResponseWriter, r *http.Request, ps httprouter.Params)
- func (pm *PluginManager) HandleReload(w http.ResponseWriter, r *http.Request, ps httprouter.Params)
- func (pm *PluginManager) HandleStatus(w http.ResponseWriter, r *http.Request, ps httprouter.Params)
- func (pm *PluginManager) ReloadPlugin(pluginName string) error
- func (pm *PluginManager) SetPluginSystem(ps *integration.PluginSystem)
- func (pm *PluginManager) UpdatePluginConfig(pluginName string, newConfig map[string]interface{}) error
- type PluginSnapshot
- type PluginState
- type RequestDrainer
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ActiveRequest ¶
type ActiveRequest struct {
ID string
StartTime time.Time
Context context.Context
Cancel context.CancelFunc
PluginName string
}
ActiveRequest represents an active HTTP request
type PluginManager ¶
type PluginManager struct {
// contains filtered or unexported fields
}
PluginManager manages plugin lifecycle for HTTP servers
func NewPluginManager ¶
func NewPluginManager(pluginSystem *integration.PluginSystem, config *config.Settings, logger *log.Logger) (*PluginManager, error)
NewPluginManager creates a new plugin lifecycle manager
func (*PluginManager) GetPluginStatus ¶
func (pm *PluginManager) GetPluginStatus() map[string]interface{}
GetPluginStatus returns overall plugin system status
func (*PluginManager) GetPluginsHealth ¶
func (pm *PluginManager) GetPluginsHealth() map[string]interface{}
GetPluginsHealth returns health check for all plugins
func (*PluginManager) GetPluginsList ¶
func (pm *PluginManager) GetPluginsList() []map[string]interface{}
GetPluginsList returns detailed list of all plugins
func (*PluginManager) HandleConfig ¶ added in v0.0.4
func (pm *PluginManager) HandleConfig(w http.ResponseWriter, r *http.Request, ps httprouter.Params)
HandleConfig handles plugin configuration retrieval
func (*PluginManager) HandleConfigUpdate ¶ added in v0.0.4
func (pm *PluginManager) HandleConfigUpdate(w http.ResponseWriter, r *http.Request, ps httprouter.Params)
HandleConfigUpdate handles plugin configuration updates
func (*PluginManager) HandleHealth ¶ added in v0.0.4
func (pm *PluginManager) HandleHealth(w http.ResponseWriter, r *http.Request, ps httprouter.Params)
HandleHealth returns health check for all plugins
func (*PluginManager) HandleList ¶ added in v0.0.4
func (pm *PluginManager) HandleList(w http.ResponseWriter, r *http.Request, ps httprouter.Params)
HandleList returns list of all plugins
func (*PluginManager) HandleReload ¶ added in v0.0.4
func (pm *PluginManager) HandleReload(w http.ResponseWriter, r *http.Request, ps httprouter.Params)
HandleReload handles plugin reload requests
func (*PluginManager) HandleStatus ¶ added in v0.0.4
func (pm *PluginManager) HandleStatus(w http.ResponseWriter, r *http.Request, ps httprouter.Params)
HandleStatus returns plugin system status
func (*PluginManager) ReloadPlugin ¶
func (pm *PluginManager) ReloadPlugin(pluginName string) error
ReloadPlugin reloads a specific plugin with graceful draining
func (*PluginManager) SetPluginSystem ¶
func (pm *PluginManager) SetPluginSystem(ps *integration.PluginSystem)
SetPluginSystem sets the plugin system instance
func (*PluginManager) UpdatePluginConfig ¶
func (pm *PluginManager) UpdatePluginConfig(pluginName string, newConfig map[string]interface{}) error
UpdatePluginConfig updates a plugin's configuration
type PluginSnapshot ¶
type PluginSnapshot struct {
PluginName string
Configuration map[string]interface{}
State PluginState
Timestamp time.Time
Version int
}
PluginSnapshot represents a rollback state for a plugin
type PluginState ¶
type PluginState int
PluginState represents the state of a plugin
const ( PluginStateLoading PluginState = iota PluginStateActive PluginStateReloading PluginStateUnloading PluginStateFailed PluginStateDisabled )
type RequestDrainer ¶
type RequestDrainer struct {
// contains filtered or unexported fields
}
RequestDrainer manages graceful request draining during plugin transitions
func NewRequestDrainer ¶
func NewRequestDrainer() *RequestDrainer
NewRequestDrainer creates a new request drainer