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.
Click to show internal directories.
Click to hide internal directories.