Documentation ¶
Index ¶
- Constants
- func EventsCommand() *cobra.Command
- func FetchCommand() *cobra.Command
- func WaitCommand() *cobra.Command
- type CaptureIdentifiersFilter
- type CollectorStatusInfo
- type EventPrinter
- type EventsRunner
- type FetchRunner
- type FetchStatusInfo
- type ResourceStatus
- type ResourceStatusCollector
- type ResourceStatusData
- type RowData
- type StatusData
- type StatusInfo
- type TablePrinter
- type WaitRunner
Constants ¶
const ( ESC = 27 RED color = 31 GREEN color = 32 YELLOW color = 33 WHITE color = 37 )
Variables ¶
This section is empty.
Functions ¶
func EventsCommand ¶
func FetchCommand ¶
func WaitCommand ¶
Types ¶
type CaptureIdentifiersFilter ¶
type CaptureIdentifiersFilter struct {
Identifiers []wait.ResourceIdentifier
}
CaptureIdentifiersFilter implements the Filter interface in the kio package. It captures the identifiers for all resources passed through the pipeline.
type CollectorStatusInfo ¶
type CollectorStatusInfo struct {
Collector *ResourceStatusCollector
}
CollectorStatusInfo is a wrapper around the ResourceStatusCollector to make it adhere to the interface of the TableWriter.
func (CollectorStatusInfo) CurrentStatus ¶
func (f CollectorStatusInfo) CurrentStatus() StatusData
CurrentStatus implements the interface for the TableWriter and returns a copy of the current status of the resources in the ResourceStatusCollector. This is done to make sure the TableWriter does not have to deal with synchronization when accessing the data.
type EventPrinter ¶
type EventPrinter struct {
// contains filtered or unexported fields
}
type EventsRunner ¶
type EventsRunner struct { IncludeSubpackages bool Interval time.Duration Timeout time.Duration Command *cobra.Command // contains filtered or unexported fields }
EventsRunner captures the parameters for the command and contains the run function.
func GetEventsRunner ¶
func GetEventsRunner() *EventsRunner
GetEventsRunner returns a command EventsRunner.
type FetchRunner ¶
type FetchRunner struct { IncludeSubpackages bool Command *cobra.Command // contains filtered or unexported fields }
FetchRunner captures the parameters for the command and contains the run function.
func GetFetchRunner ¶
func GetFetchRunner() *FetchRunner
GetFetchRunner returns a command FetchRunner.
type FetchStatusInfo ¶
type FetchStatusInfo struct {
Results []wait.ResourceResult
}
FetchStatusInfo wraps the results from the FetchAndResolve function to the format expected in the TablePrinter.
func (FetchStatusInfo) CurrentStatus ¶
func (f FetchStatusInfo) CurrentStatus() StatusData
CurrentStatus returns the latest information known about the status of each of the resources. For FetchStatusInfo, the result is never updated, so it just returns the information provided by the slice of wait.ResourceResult at creation.
type ResourceStatus ¶
type ResourceStatus struct { Identifier wait.ResourceIdentifier Status status.Status Message string }
ResourceStatus contains the status information for a single resource.
type ResourceStatusCollector ¶
type ResourceStatusCollector struct { AggregateStatus status.Status ResourceStatuses []*ResourceStatus // contains filtered or unexported fields }
ResourceStatusCollector captures the latest state seen for all resources based on the events from the Wait channel. This is used by the TablePrinter to display status for all resources.
type ResourceStatusData ¶
type ResourceStatusData struct { Identifier wait.ResourceIdentifier Status status.Status Message string }
type StatusData ¶
type StatusData struct { AggregateStatus status.Status ResourceStatuses []ResourceStatusData }
type StatusInfo ¶
type StatusInfo interface {
CurrentStatus() StatusData
}
type TablePrinter ¶
type TablePrinter struct {
// contains filtered or unexported fields
}
func (*TablePrinter) Print ¶
func (s *TablePrinter) Print()
func (*TablePrinter) PrintUntil ¶
func (s *TablePrinter) PrintUntil(stop <-chan struct{}, interval time.Duration) <-chan struct{}