Documentation
¶
Index ¶
- Variables
- type LifecycleEventHandler
- type LifecycleEventNotifier
- func (n *LifecycleEventNotifier) AddHandler(handler *LifecycleEventHandler)
- func (n *LifecycleEventNotifier) NotifyInit()
- func (n *LifecycleEventNotifier) NotifyInspectionEnd(runId string, inspectionType string, status string, size int)
- func (n *LifecycleEventNotifier) NotifyInspectionStart(runId string, inspectionType string)
- func (n *LifecycleEventNotifier) NotifyTerminate(s os.Signal)
- type LifecycleHandlerInit
- type LifecycleHandlerInspectionEnd
- type LifecycleHandlerInspectionStart
- type LifecycleHandlerTerminate
Constants ¶
This section is empty.
Variables ¶
var Default = NewLifecycleEventNotifier()
Functions ¶
This section is empty.
Types ¶
type LifecycleEventHandler ¶
type LifecycleEventHandler struct {
OnInit LifecycleHandlerInit
OnTerminate LifecycleHandlerTerminate
OnInspectionStart LifecycleHandlerInspectionStart
OnInspectionEnd LifecycleHandlerInspectionEnd
}
LifecycleEventHandler is a collection of event handlers called at the event on KHI backend.
type LifecycleEventNotifier ¶
type LifecycleEventNotifier struct {
// contains filtered or unexported fields
}
LifecycleEventNotifier provides api to call registered lifecycle event handlers.
func NewLifecycleEventNotifier ¶
func NewLifecycleEventNotifier() *LifecycleEventNotifier
func (*LifecycleEventNotifier) AddHandler ¶
func (n *LifecycleEventNotifier) AddHandler(handler *LifecycleEventHandler)
AddHandler adds the given handler to be called on events.
func (*LifecycleEventNotifier) NotifyInit ¶
func (n *LifecycleEventNotifier) NotifyInit()
NotifyInit calls OnInit function for each extensions if it was given in it's definition.
func (*LifecycleEventNotifier) NotifyInspectionEnd ¶
func (n *LifecycleEventNotifier) NotifyInspectionEnd(runId string, inspectionType string, status string, size int)
NotifyInspectionEnd calls OnInspectionEnd function for each extensions if it was given in it's definition.
func (*LifecycleEventNotifier) NotifyInspectionStart ¶
func (n *LifecycleEventNotifier) NotifyInspectionStart(runId string, inspectionType string)
NotifyInspectionStart calls OnInspectionStart function for each extensions if it was given in it's definition.
func (*LifecycleEventNotifier) NotifyTerminate ¶
func (n *LifecycleEventNotifier) NotifyTerminate(s os.Signal)
NotifyTerminate calls OnTerminate function for each extensions if it was given in it's definition.
type LifecycleHandlerInit ¶
type LifecycleHandlerInit = func()
LifecycleHandlerInit is the handler on initializing application.
type LifecycleHandlerInspectionEnd ¶
type LifecycleHandlerInspectionEnd = func(runId string, inspectionType string, status string, size int)
LifecycleHandlerInspectionEnd is the handler on finishing a new inspection task.
type LifecycleHandlerInspectionStart ¶
LifecycleHandlerInspectionStart is the handler on starting a new inspection task.
type LifecycleHandlerTerminate ¶
LifecycleHandlerTerminate is the handler on terminating application