table

package
v0.12.0 Latest Latest
Warning

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

Go to latest
Published: May 29, 2020 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Printer

type Printer struct {
	IOStreams genericclioptions.IOStreams
}

func (*Printer) Print

func (t *Printer) Print(ch <-chan event.Event, _ bool)

type ResourceInfo

type ResourceInfo struct {

	// ResourceAction defines the action we are performing
	// on this particular resource. This can be either Apply
	// or Prune.
	ResourceAction event.ResourceAction

	// ApplyOpResult contains the result after
	// a resource has been applied to the cluster.
	ApplyOpResult *event.ApplyEventOperation

	// PruneOpResult contains the result after
	// a prune operation on a resource
	PruneOpResult *event.PruneEventOperation

	// DeleteOpResult contains the result after
	// a delete operation on a resource
	DeleteOpResult *event.DeleteEventOperation
	// contains filtered or unexported fields
}

ResourceInfo captures the latest seen state of a single resource. This is used for top-level resources that have a ResourceAction associated with them.

func (*ResourceInfo) Identifier

func (r *ResourceInfo) Identifier() object.ObjMetadata

Identifier returns the identifier for the given resource.

func (*ResourceInfo) ResourceStatus

func (r *ResourceInfo) ResourceStatus() *pe.ResourceStatus

ResourceStatus returns the latest seen status for the resource.

func (*ResourceInfo) SubResources

func (r *ResourceInfo) SubResources() []table.Resource

SubResources returns a slice of Resource which contains any resources created and managed by this resource.

type ResourceInfos

type ResourceInfos []*ResourceInfo

func (ResourceInfos) Len

func (g ResourceInfos) Len() int

func (ResourceInfos) Less

func (g ResourceInfos) Less(i, j int) bool

func (ResourceInfos) Swap

func (g ResourceInfos) Swap(i, j int)

type ResourceState

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

ResourceState contains the latest state for all the resources.

func (*ResourceState) Error added in v0.8.0

func (r *ResourceState) Error() error

func (*ResourceState) Resources

func (r *ResourceState) Resources() []table.Resource

Resources returns a slice containing the latest state for each individual resource.

type ResourceStateCollector

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

ResourceStateCollector consumes the events from the applier eventChannel and keeps track of the latest state for all resources. It also provides functionality for fetching the latest seen state and return it in format that can be used by the BaseTablePrinter.

func (*ResourceStateCollector) LatestState

func (r *ResourceStateCollector) LatestState() *ResourceState

LatestState returns a ResourceState object that contains a copy of the latest state for all resources.

func (*ResourceStateCollector) Listen

func (r *ResourceStateCollector) Listen(eventChannel <-chan event.Event) <-chan struct{}

Listen starts a new goroutine that will listen for events on the provided eventChannel and keep track of the latest state for the resources. The goroutine will exit when the provided eventChannel is closed. The function returns a channel. When this channel is closed, the goroutine has processed all events in the eventChannel and exited.

type SubResourceInfo

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

SubResourceInfo captures the latest seen state of a single subResource, i.e. resources that are created and managed by one of the top-level resources we either apply or prune.

func (*SubResourceInfo) Identifier

func (r *SubResourceInfo) Identifier() object.ObjMetadata

Identifier returns the identifier for the given subResource.

func (*SubResourceInfo) ResourceStatus

func (r *SubResourceInfo) ResourceStatus() *pe.ResourceStatus

ResourceStatus returns the latest seen status for the subResource.

func (*SubResourceInfo) SubResources

func (r *SubResourceInfo) SubResources() []table.Resource

SubResources returns a slice of Resource which contains any resources created and managed by this resource.

Jump to

Keyboard shortcuts

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