kube

package
v0.0.0-...-46d7da7 Latest Latest
Warning

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

Go to latest
Published: Jul 20, 2018 License: Apache-2.0 Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Types = Schema{}

Types in the schema.

Functions

func NewSource

func NewSource(k Interfaces, resyncPeriod time.Duration) (runtime.Source, error)

NewSource returns a Kubernetes implementation of runtime.Source.

Types

type Interfaces

type Interfaces interface {
	DynamicInterface(gv schema.GroupVersion, kind string, listKind string) (dynamic.Interface, error)
}

Interfaces interface allows access to the Kubernetes API Service methods. It is mainly used for test/injection purposes.

func NewKube

func NewKube(cfg *rest.Config) Interfaces

NewKube returns a new instance of Interfaces.

func NewKubeFromConfigFile

func NewKubeFromConfigFile(kubeconfig string) (Interfaces, error)

NewKubeFromConfigFile returns a new instance of Interfaces.

type ResourceSpec

type ResourceSpec struct {

	// Singular name of the K8s resource
	Singular string

	// Plural name of the K8s resource
	Plural string

	// Group name of the K8s resource
	Group string

	// Version of the K8s resource
	Version string

	// Kind of the K8s resource
	Kind string

	// ListKind of the K8s resource
	ListKind string

	// Target resource type of the resource
	Target resource.Info

	// The converter to use
	Converter converter.Fn
}

ResourceSpec represents a known crd. It is used to drive the K8s-related machinery, and to map to the proto format.

func (*ResourceSpec) APIResource

func (i *ResourceSpec) APIResource() *v1.APIResource

APIResource generated from this type.

func (*ResourceSpec) GroupVersion

func (i *ResourceSpec) GroupVersion() sc.GroupVersion

GroupVersion returns the GroupVersion of this type.

type Schema

type Schema struct {
	// contains filtered or unexported fields
}

Schema represents a set of known Kubernetes resource types.

func (*Schema) All

func (e *Schema) All() []ResourceSpec

All returns information about all known types.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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