eventhandler

package
v1.9.2 Latest Latest
Warning

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

Go to latest
Published: Apr 10, 2023 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Overview

Package eventhandler will provide all functions to handle the events

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Handler

type Handler struct {
	// contains filtered or unexported fields
}

Handler is the handler for all events.

func NewHandler

func NewHandler(ctx context.Context, wg *sync.WaitGroup) *Handler

NewHandler will initialize a handler.

func (*Handler) AnalyzeStartedHandler

func (h *Handler) AnalyzeStartedHandler(line *frame.Line, value interface{}) error

AnalyzeStartedHandler will generate a spinner during analyzing images.

func (*Handler) CatalogerStartedHandler

func (h *Handler) CatalogerStartedHandler(line *frame.Line, m interface{}) error

CatalogerStartedHandler periodically writes catalog statistics to a single line.

func (*Handler) CollectLayersHandler added in v1.7.2

func (h *Handler) CollectLayersHandler(line *frame.Line, value interface{}) error

CollectLayersHandler generates a spinner while reading the layers of an image

func (*Handler) CopyImageHandler

func (h *Handler) CopyImageHandler(line *frame.Line, value interface{}) error

CopyImageHandler will render a spinner and record the process for copying image.

func (*Handler) FetchImageHandler

func (h *Handler) FetchImageHandler(line *frame.Line, value interface{}) error

FetchImageHandler periodically writes an image save and write-to-disk process in the form of a progress bar.

func (*Handler) PullDockerImageHandler

func (h *Handler) PullDockerImageHandler(line *frame.Line, value interface{}) error

PullDockerImageHandler periodically writes a formatted line widget representing a docker image pull event. This function is modified based on 'github.com/anchore/syft/ui/event_handlers.PullDockerImageHandler'.

func (*Handler) ReadImageHandler

func (h *Handler) ReadImageHandler(line *frame.Line, value interface{}) error

ReadImageHandler periodically writes an image read/parse/build-tree status in the form of a progress bar.

func (*Handler) StartScanHandler added in v1.7.2

func (h *Handler) StartScanHandler(line *frame.Line, value interface{}) error

StartScanHandler generates a spinner while waiting for image id

Jump to

Keyboard shortcuts

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