lifecycle

package
v0.56.0-beta-2 Latest Latest
Warning

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

Go to latest
Published: Jun 19, 2026 License: Apache-2.0 Imports: 1 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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