client

package
v0.15.2-dev Latest Latest
Warning

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

Go to latest
Published: Aug 15, 2018 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FqName

func FqName(namespace, name string) string

FqName returns "namespace.name"

func FqObjName

func FqObjName(o metav1.Object) string

FqObjName returns "namespace.name"

func FromGVK

FromGVK returns the ResourceClient for a given object

func FromResource

FromResource returns the ResourceClient for a given object

func NamespaceOrDefault

func NamespaceOrDefault(ns string) string

NamespaceOrDefault returns `ns` or the the default namespace `"default"` if `ns` is empty.

func NewMemcachedDiscoveryClient

func NewMemcachedDiscoveryClient(cl discovery.DiscoveryInterface) discovery.CachedDiscoveryInterface

NewMemcachedDiscoveryClient creates a new DiscoveryClient that caches results in memory

func ParseFqName

func ParseFqName(id string) (namespace, name string)

ParseFqName will parse a fully-qualified Kubernetes object name.

Types

type ServerVersion

type ServerVersion struct {
	Major int
	Minor int
}

ServerVersion captures k8s major.minor version in a parsed form

func DefaultVersion

func DefaultVersion() ServerVersion

DefaultVersion takes a wild guess (v1.9) at the version of a Kubernetes cluster.

func FetchVersion

func FetchVersion(v discovery.ServerVersionInterface) (ret ServerVersion, err error)

FetchVersion fetches version information from discovery client, and parses

func (ServerVersion) Compare

func (v ServerVersion) Compare(major, minor int) int

Compare returns -1/0/+1 iff v is less than / equal / greater than major.minor

func (ServerVersion) String

func (v ServerVersion) String() string

Jump to

Keyboard shortcuts

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