collect

package
v1.12.1-rc.0 Latest Latest
Warning

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

Go to latest
Published: Apr 4, 2024 License: Apache-2.0 Imports: 25 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Collector

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

func NewCollector

func NewCollector(
	baseDir string,
	printers []ResourcePrinterInterface,
	discoveryClient discovery.DiscoveryInterface,
	corev1Client corev1client.CoreV1Interface,
	dynamicClient dynamic.Interface,
	relatedResources bool,
	keepGoing bool,
	logsLimitBytes int64,
) *Collector

func (*Collector) CollectObject

func (c *Collector) CollectObject(ctx context.Context, u *unstructured.Unstructured, resourceInfo *ResourceInfo) error

func (*Collector) CollectResource

func (c *Collector) CollectResource(ctx context.Context, resourceInfo *ResourceInfo, namespace, name string) error

func (*Collector) CollectResources

func (c *Collector) CollectResources(ctx context.Context, resourceInfo *ResourceInfo, namespace string) error

func (*Collector) DiscoverResources

func (c *Collector) DiscoverResources(ctx context.Context, filter discovery.ResourcePredicateFunc) ([]*ResourceInfo, error)

type OmitManagedFieldsPrinter

type OmitManagedFieldsPrinter struct {
	Delegate ResourcePrinterInterface
}

func (*OmitManagedFieldsPrinter) GetSuffix

func (p *OmitManagedFieldsPrinter) GetSuffix() string

func (*OmitManagedFieldsPrinter) PrintObj

func (p *OmitManagedFieldsPrinter) PrintObj(resourceInfo *ResourceInfo, obj runtime.Object, w io.Writer) error

type ResourceInfo

type ResourceInfo struct {
	Scope    meta.RESTScope
	Resource schema.GroupVersionResource
}

func NewResourceInfoFromMapping

func NewResourceInfoFromMapping(mapping *meta.RESTMapping) *ResourceInfo

func ReplaceIsometricResourceInfosIfPresent

func ReplaceIsometricResourceInfosIfPresent(resourceInfos []*ResourceInfo) ([]*ResourceInfo, error)

type ResourcePrinterInterface

type ResourcePrinterInterface interface {
	PrintObj(*ResourceInfo, runtime.Object, io.Writer) error
	SuffixInterface
}

type SuffixInterface

type SuffixInterface interface {
	GetSuffix() string
}

type YAMLPrinter

type YAMLPrinter struct {
}

func (*YAMLPrinter) GetSuffix

func (p *YAMLPrinter) GetSuffix() string

func (*YAMLPrinter) PrintObj

func (p *YAMLPrinter) PrintObj(resourceInfo *ResourceInfo, obj runtime.Object, w io.Writer) error

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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