Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Base ¶
type Base struct {
// contains filtered or unexported fields
}
func NewControllerBase ¶
func NewControllerBase() Base
func (*Base) RemoveHook ¶
type Controller ¶
type Controller interface {
Start(int, <-chan struct{}) error
Stop()
AddHook(hook Hook) error
RemoveHook(hook Hook) error
}
Controller is generic interface for custom controller, it defines the basic behaviour of custom controller
func NewEmptyController ¶
func NewEmptyController(reg prometheus.Registerer) Controller
type Event ¶
type Event struct {
Type EventType
Object interface{}
}
Event represent event processed by controller.
type EventsHook ¶
EventsHook extends `Hook` interface.
func NewEventsHook ¶
func NewEventsHook(channelSize int) EventsHook
type Hook ¶
type Hook interface {
// OnAdd runs after the controller finished processing the addObject
OnAdd(object interface{})
// OnUpdate runs after the controller finished processing the updatedObject
OnUpdate(object interface{})
// OnDelete run after the controller finished processing the deletedObject
OnDelete(object interface{})
}
Hook is interface for hooks that can be injected into custom controller
Click to show internal directories.
Click to hide internal directories.