status

package
v0.4.1 Latest Latest
Warning

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

Go to latest
Published: Sep 25, 2023 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

View Source
const (
	StatusInterval   = time.Second * 10
	StatusRetryLimit = 10
)

Variables

This section is empty.

Functions

func NewCmdStatus

func NewCmdStatus() *cobra.Command

func PrintRunningStatus

func PrintRunningStatus(s *aggregation.Status) error

Types

type PrintablePluginStatus

type PrintablePluginStatus struct {
	Name     string
	Status   string
	Result   string
	Progress string
	Message  string
}

type PrintableStatus

type PrintableStatus struct {
	GlobalStatus   string
	CurrentTime    string
	PluginStatuses []PrintablePluginStatus
}

type StatusOptions

type StatusOptions struct {
	Latest *aggregation.Status
	// contains filtered or unexported fields
}

func NewStatusOptions

func NewStatusOptions(watch bool) *StatusOptions

func (*StatusOptions) GetStatus

func (s *StatusOptions) GetStatus() string

GetStatus returns the latest aggregator status if there is one, otherwise empty string.

func (*StatusOptions) GetStatusForPlugin

func (s *StatusOptions) GetStatusForPlugin(name string) *aggregation.PluginStatus

GetStatusForPlugin will get a plugin's status from the state saved in StatusOptions

func (*StatusOptions) PreRunCheck

func (s *StatusOptions) PreRunCheck(kclient kubernetes.Interface) error

func (*StatusOptions) Print

func (s *StatusOptions) Print(cmd *cobra.Command, sclient sonobuoyclient.Interface) error

func (*StatusOptions) Update

func (s *StatusOptions) Update(sclient sonobuoyclient.Interface) error

Update the Sonobuoy state saved in StatusOptions

func (*StatusOptions) WaitForStatusReport

func (s *StatusOptions) WaitForStatusReport(ctx context.Context, sclient sonobuoyclient.Interface) error

WaitForStatusReport will block until either context is canceled, status is reported, or retry limit reach. An error will not result in immediate failure and will be retried.

Jump to

Keyboard shortcuts

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