Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Register ¶
func Register(name, description string, c Controller) error
Register registers a new controller.
Types ¶
type Control ¶
type Control interface {
// StartStopControllers starts/stops all controllers according to configuration.
StartStopControllers(*cfgapi.Config) error
// PreCreateHooks runs the pre-create hooks of all registered controllers.
RunPreCreateHooks(cache.Container) error
// RunPreStartHooks runs the pre-start hooks of all registered controllers.
RunPreStartHooks(cache.Container) error
// RunPostStartHooks runs the post-start hooks of all registered controllers.
RunPostStartHooks(cache.Container) error
// RunPostUpdateHooks runs the post-update hooks of all registered controllers.
RunPostUpdateHooks(cache.Container) error
// RunPostStopHooks runs the post-stop hooks of all registered controllers.
RunPostStopHooks(cache.Container) error
}
Control is the interface for triggering controller-/domain-specific post-decision actions.
type Controller ¶
type Controller interface {
// Start prepares the controller for resource control/decision enforcement.
Start(cache.Cache, *cfgapi.Config) (bool, error)
// Stop shuts down the controller.
Stop()
// PreCreateHook is the controller's pre-create hook.
PreCreateHook(cache.Container) error
// PreStartHook is the controller's pre-start hook.
PreStartHook(cache.Container) error
// PostStartHook is the controller's post-start hook.
PostStartHook(cache.Container) error
// PostUpdateHook is the controller's post-update hook.
PostUpdateHook(cache.Container) error
// PostStopHook is the controller's post-stop hook.
PostStopHook(cache.Container) error
}
Controller is the interface all resource controllers must implement.
Click to show internal directories.
Click to hide internal directories.