eventhandler

package
v1.6.3 Latest Latest
Warning

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

Go to latest
Published: Aug 30, 2022 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) 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.

Jump to

Keyboard shortcuts

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