yaml

package
v0.0.0-...-b131186 Latest Latest
Warning

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

Go to latest
Published: Sep 1, 2019 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ExtractClusterReferences

func ExtractClusterReferences(out *ParseOutput, c *clusterv1.Cluster) (res []*unstructured.Unstructured)

func ExtractMachineReferences

func ExtractMachineReferences(out *ParseOutput, m *clusterv1.Machine) (res []*unstructured.Unstructured)

func NewYAMLDecoder

func NewYAMLDecoder(r io.ReadCloser) streaming.Decoder

Types

type ParseInput

type ParseInput struct {
	File string
}

type ParseOutput

type ParseOutput struct {
	Clusters            []*clusterv1.Cluster
	Machines            []*clusterv1.Machine
	MachineSets         []*clusterv1.MachineSet
	MachineDeployments  []*clusterv1.MachineDeployment
	UnstructuredObjects []*unstructured.Unstructured
}

func Parse

func Parse(input ParseInput) (*ParseOutput, error)

Parse extracts runtime objects from a file.

func (*ParseOutput) Add

func (p *ParseOutput) Add(o *ParseOutput) *ParseOutput

Add adds the other ParseOutput slices to this instance.

func (*ParseOutput) FindUnstructuredReference

func (p *ParseOutput) FindUnstructuredReference(ref *corev1.ObjectReference) *unstructured.Unstructured

FindUnstructuredReference takes in an ObjectReference and tries to find an Unstructured object.

Jump to

Keyboard shortcuts

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