utils

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Jun 14, 2017 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FlattenToV1

func FlattenToV1(objs []runtime.Object) []*runtime.Unstructured

FlattenToV1 expands any List-type objects into their members, and cooerces everything to v1.Unstructured. Panics if coercion encounters an unexpected object type.

func NewMemcachedDiscoveryClient

func NewMemcachedDiscoveryClient(cl discovery.DiscoveryInterface) discovery.CachedDiscoveryInterface

NewMemcachedDiscoveryClient creates a new DiscoveryClient that caches results in memory

func Read

func Read(vm *jsonnet.VM, path string) ([]runtime.Object, error)

Read fetches and decodes K8s objects by path. TODO: Replace this with something supporting more sophisticated content negotiation.

Types

type AlphabeticalOrder added in v0.2.0

type AlphabeticalOrder []*runtime.Unstructured

AlphabeticalOrder is a `sort.Interface` that sorts the objects by namespace/name/kind alphabetical order

func (AlphabeticalOrder) Len added in v0.2.0

func (l AlphabeticalOrder) Len() int

func (AlphabeticalOrder) Less added in v0.2.0

func (l AlphabeticalOrder) Less(i, j int) bool

func (AlphabeticalOrder) Swap added in v0.2.0

func (l AlphabeticalOrder) Swap(i, j int)

type DependencyOrder added in v0.2.0

type DependencyOrder []*runtime.Unstructured

DependencyOrder is a `sort.Interface` that *best-effort* sorts the objects so that known dependencies appear earlier in the list. The idea is to prevent *some* of the "crash-restart" loops when creating inter-dependent resources.

func (DependencyOrder) Len added in v0.2.0

func (l DependencyOrder) Len() int

func (DependencyOrder) Less added in v0.2.0

func (l DependencyOrder) Less(i, j int) bool

func (DependencyOrder) Swap added in v0.2.0

func (l DependencyOrder) Swap(i, j int)

Jump to

Keyboard shortcuts

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