lifecycle

package
v0.51.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 26, 2026 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

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

type LifecycleHandlerInspectionStart = func(runId string, inspectionType string)

LifecycleHandlerInspectionStart is the handler on starting a new inspection task.

type LifecycleHandlerTerminate

type LifecycleHandlerTerminate = func(s os.Signal)

LifecycleHandlerTerminate is the handler on terminating application

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL