kubernetes/staging/src/k8s.io/cli-runtime/pkg/resource/visitor.go

const constSTDINstr

const stopValidateMessage

type Watchable

type ResourceMapping

type Info

// Visit implements Visitor
func (i *Info) Visit(fn VisitorFunc) error {}

// Get retrieves the object from the Namespace and Name fields
func (i *Info) Get() (err error) {}

// Refresh updates the object with another object. If ignoreError is set
// the Object will be updated even if name, namespace, or resourceVersion
// attributes cannot be loaded from the object.
func (i *Info) Refresh(obj runtime.Object, ignoreError bool) error {}

// ObjectName returns an approximate form of the resource's kind/name.
func (i *Info) ObjectName() string {}

// String returns the general purpose string representation
func (i *Info) String() string {}

// Namespaced returns true if the object belongs to a namespace
func (i *Info) Namespaced() bool {}

// Watch returns server changes to this object after it was retrieved.
func (i *Info) Watch(resourceVersion string) (watch.Interface, error) {}

// ResourceMapping returns the mapping for this resource and implements ResourceMapping
func (i *Info) ResourceMapping() *meta.RESTMapping {}

type VisitorList

// Visit implements Visitor
func (l VisitorList) Visit(fn VisitorFunc) error {}

type ConcurrentVisitorList

func (l ConcurrentVisitorList) Visit(fn VisitorFunc) error {}

type EagerVisitorList

// Visit implements Visitor, and gathers errors that occur during processing until
// all sub visitors have been visited.
func (l EagerVisitorList) Visit(fn VisitorFunc) error {}

func ValidateSchema(data []byte, schema ContentValidator) error {}

type URLVisitor

func (v *URLVisitor) Visit(fn VisitorFunc) error {}

// readHttpWithRetries tries to http.Get the v.URL retries times before giving up.
func readHttpWithRetries(get httpget, duration time.Duration, u string, attempts int) (io.ReadCloser, error) {}

type httpget

// httpgetImpl Implements a function to retrieve a url and return the results.
func httpgetImpl(url string) (int, string, io.ReadCloser, error) {}

type DecoratedVisitor

// NewDecoratedVisitor will create a visitor that invokes the provided visitor functions before
// the user supplied visitor function is invoked, giving them the opportunity to mutate the Info
// object or terminate early with an error.
func NewDecoratedVisitor(v Visitor, fn ...VisitorFunc) Visitor {}

// Visit implements Visitor
func (v DecoratedVisitor) Visit(fn VisitorFunc) error {}

type ContinueOnErrorVisitor

// Visit returns nil if no error occurs during traversal, a regular
// error if one occurs, or if multiple errors occur, an aggregate
// error.  If the provided visitor fails on any individual item it
// will not prevent the remaining items from being visited. An error
// returned by the visitor directly may still result in some items
// not being visited.
func (v ContinueOnErrorVisitor) Visit(fn VisitorFunc) error {}

type FlattenListVisitor

// NewFlattenListVisitor creates a visitor that will expand list style runtime.Objects
// into individual items and then visit them individually.
func NewFlattenListVisitor(v Visitor, typer runtime.ObjectTyper, mapper *mapper) Visitor {}

func (v FlattenListVisitor) Visit(fn VisitorFunc) error {}

func ignoreFile(path string, extensions []string) bool {}

// FileVisitorForSTDIN return a special FileVisitor just for STDIN
func FileVisitorForSTDIN(mapper *mapper, schema ContentValidator) Visitor {}

// ExpandPathsToFileVisitors will return a slice of FileVisitors that will handle files from the provided path.
// After FileVisitors open the files, they will pass an io.Reader to a StreamVisitor to do the reading. (stdin
// is also taken care of). Paths argument also accepts a single file, and will return a single visitor
func ExpandPathsToFileVisitors(mapper *mapper, paths string, recursive bool, extensions []string, schema ContentValidator) ([]Visitor, error) {}

type FileVisitor

// Visit in a FileVisitor is just taking care of opening/closing files
func (v *FileVisitor) Visit(fn VisitorFunc) error {}

type StreamVisitor

// NewStreamVisitor is a helper function that is useful when we want to change the fields of the struct but keep calls the same.
func NewStreamVisitor(r io.Reader, mapper *mapper, source string, schema ContentValidator) *StreamVisitor {}

// Visit implements Visitor over a stream. StreamVisitor is able to distinct multiple resources in one stream.
func (v *StreamVisitor) Visit(fn VisitorFunc) error {}

func UpdateObjectNamespace(info *Info, err error) error {}

// FilterNamespace omits the namespace if the object is not namespace scoped
func FilterNamespace(info *Info, err error) error {}

// SetNamespace ensures that every Info object visited will have a namespace
// set. If info.Object is set, it will be mutated as well.
func SetNamespace(namespace string) VisitorFunc {}

// RequireNamespace will either set a namespace if none is provided on the
// Info object, or if the namespace is set and does not match the provided
// value, returns an error. This is intended to guard against administrators
// accidentally operating on resources outside their namespace.
func RequireNamespace(namespace string) VisitorFunc {}

// RetrieveLatest updates the Object on each Info by invoking a standard client
// Get.
func RetrieveLatest(info *Info, err error) error {}

// RetrieveLazy updates the object if it has not been loaded yet.
func RetrieveLazy(info *Info, err error) error {}

type FilterFunc

type FilteredVisitor

func NewFilteredVisitor(v Visitor, fn ...FilterFunc) Visitor {}

func (v FilteredVisitor) Visit(fn VisitorFunc) error {}

func FilterByLabelSelector(s labels.Selector) FilterFunc {}

type InfoListVisitor

func (infos InfoListVisitor) Visit(fn VisitorFunc) error {}