cmd

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Jan 10, 2020 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ESC          = 27
	RED    color = 31
	GREEN  color = 32
	YELLOW color = 33
	WHITE  color = 37
)

Variables

This section is empty.

Functions

func EventsCommand

func EventsCommand() *cobra.Command

func FetchCommand

func FetchCommand() *cobra.Command

func WaitCommand

func WaitCommand() *cobra.Command

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.

func (*CaptureIdentifiersFilter) Filter

func (f *CaptureIdentifiersFilter) Filter(slice []*yaml.RNode) ([]*yaml.RNode, error)

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 RowData

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

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{}

type WaitRunner

type WaitRunner struct {
	IncludeSubpackages bool
	Interval           time.Duration
	Timeout            time.Duration
	Command            *cobra.Command
	// contains filtered or unexported fields
}

WaitRunner captures the parameters for the command and contains the run function.

func GetWaitRunner

func GetWaitRunner() *WaitRunner

GetWaitRunner return a command WaitRunner.

Jump to

Keyboard shortcuts

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