progress

package
v1.23.3 Latest Latest
Warning

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

Go to latest
Published: Nov 8, 2024 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type InstallState

type InstallState int
const (
	StateInstalling InstallState = iota
	StatePruning
	StateComplete
	StateUninstallComplete
)

type Log

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

Log records the progress of an installation This aims to provide information about the install of multiple components in parallel, while working around the limitations of the pb library, which will only support single lines. To do this, we aggregate the current components into a single line, and as components complete there final state is persisted to a new line.

func NewLog

func NewLog() *Log

func (*Log) NewComponent

func (p *Log) NewComponent(component string) *ManifestLog

func (*Log) SetMessage

func (p *Log) SetMessage(status string, finish bool)

func (*Log) SetState

func (p *Log) SetState(state InstallState)

type ManifestLog

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

ManifestLog records progress for a single component

func (*ManifestLog) ReportError

func (p *ManifestLog) ReportError(err string)

func (*ManifestLog) ReportFinished

func (p *ManifestLog) ReportFinished()

func (*ManifestLog) ReportProgress

func (p *ManifestLog) ReportProgress()

func (*ManifestLog) ReportWaiting

func (p *ManifestLog) ReportWaiting(resources []string)

Jump to

Keyboard shortcuts

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