visitor

package
v0.33.13 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Decode

func Decode(scheme *runtime.Scheme, v Interface) ([]runtime.Object, error)

func DecodeAll

func DecodeAll(scheme *runtime.Scheme, vs []Interface) ([]runtime.Object, error)

Given a set of YAML inputs, decode them into real API objects.

The scheme is used to lookup the objects by group/version/kind.

func File

func File(path string) fileVisitor

func ParseStream

func ParseStream(scheme *runtime.Scheme, r io.Reader) ([]runtime.Object, error)

Parses a stream of Tilt configuration objects.

In kubectl, the CLI has to get the type information from the server in order to perform validation. In Tilt (today), we don't have to worry about version skew, so we can more aggressively validate up-front for misspelled fields and malformed YAML. So this parser is a bit stricter than the normal kubectl code.

func Stdin

func Stdin(stdin io.Reader) stdinVisitor

func URL

func URL(client HTTPClient, url string) urlVisitor

Types

type HTTPClient

type HTTPClient interface {
	Get(url string) (*http.Response, error)
}

type Interface

type Interface interface {
	Name() string
	Open() (io.ReadCloser, error)
}

A simplified version of cli-runtime/pkg/resource Visitor for objects that don't query the cluster.

func FromStrings

func FromStrings(filenames []string, stdin io.Reader) ([]Interface, error)

Convert a list of filenames into YAML inputs.

Jump to

Keyboard shortcuts

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