v1.0.1 Latest Latest

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

Go to latest
Published: May 21, 2018 License: Apache-2.0 Imports: 10 Imported by: 0




This section is empty.


This section is empty.


func Encode

func Encode(in resource.ResourceCollection) ([]byte, error)

Encode encodes the map `in` and output the encoded objects separated by `---`.


type DiffProgram

type DiffProgram struct {
	Exec   exec.Interface
	Stdout io.Writer
	Stderr io.Writer

DiffProgram finds and run the diff program. The value of KUBERNETES_EXTERNAL_DIFF environment variable will be used a diff program. By default, `diff(1)` will be used.

func (*DiffProgram) Run

func (d *DiffProgram) Run(from, to string) error

Run runs the detected diff program. `from` and `to` are the directory to diff.

type Directory

type Directory struct {
	Name string

Directory creates a new temp directory, and allows to easily create new files.

func CreateDirectory

func CreateDirectory(prefix string) (*Directory, error)

CreateDirectory does create the actual disk directory, and return a new representation of it.

func WriteToDir

func WriteToDir(in resource.ResourceCollection, dirName string, printer Printer) (*Directory, error)

WriteToDir write each object in ResourceCollection to a file named with GroupVersionKindName.

func (*Directory) Delete

func (d *Directory) Delete() error

Delete removes the directory recursively.

func (*Directory) NewFile

func (d *Directory) NewFile(name string) (*os.File, error)

NewFile creates a new file in the directory.

type Printer

type Printer struct{}

Printer is used to print an object.

func (*Printer) Print

func (p *Printer) Print(obj interface{}, w io.Writer) error

Print the object inside the writer w.


Path Synopsis

Jump to

Keyboard shortcuts

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