status

package
v0.5.0 Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const (
	DefaultStatusIntervalSeconds = 10
	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, start time.Time) 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
	ElapsedTime    string
	PluginStatuses []PrintablePluginStatus
}

type StatusInput added in v0.5.0

type StatusInput struct {
	Watch           bool
	IntervalSeconds int
}

type StatusOptions

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

StatusOptions is the interface to store input options to interface with Status command.

func NewStatusOptions

func NewStatusOptions(in *StatusInput) *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