discovery

package
v0.0.0-...-7807a54 Latest Latest
Warning

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

Go to latest
Published: Nov 12, 2024 License: BSD-3-Clause Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DiscoverObjects

func DiscoverObjects(ctx context.Context, conf *rest.Config, cb func(*unstructured.UnstructuredList) error, opts DiscoveryOptions) error

DiscoverObjects discovers all objects in the cluster and calls the provided callback for each list of objects. The callback can be called multiple times with the same

Types

type DiscoveryOptions

type DiscoveryOptions struct {
	BatchSize int64
	LogWriter io.Writer

	// MustExistResources is a list of resources that must exist in the cluster.
	// This can be used as a sanity check to ensure that the discovery process is working as expected.
	// If a resource does not exist, the discovery process will fail.
	// If the list is empty, no resources are required to exist.
	MustExistResources []string

	// IgnoreResources is a list of resources to ignore during discovery.
	IgnoreResources []*regexp.Regexp
}

func (DiscoveryOptions) GetBatchSize

func (opts DiscoveryOptions) GetBatchSize() int64

GetBatchSize returns the set batch size for listing objects or the default.

func (DiscoveryOptions) GetLogWriter

func (opts DiscoveryOptions) GetLogWriter() io.Writer

GetLogWriter returns the set batch size for listing objects or io.Discard as default.

Jump to

Keyboard shortcuts

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