client

package
v0.1.1 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrReadNamespace = errors.New("Could not read namespace from service account secret")
)

Functions

func CertPoolFromFile

func CertPoolFromFile(filename string) (*x509.CertPool, error)

CertPoolFromFile returns an x509.CertPool containing the certificates in the given PEM-encoded file. Returns an error if the file could not be read, a certificate could not be parsed, or if the file does not contain any certificates

func CertsFromPEM

func CertsFromPEM(pemCerts []byte) ([]*x509.Certificate, error)

CertsFromPEM returns the x509.Certificates contained in the given PEM-encoded byte array Returns an error if a certificate could not be parsed, or if the data does not contain any certificates

Types

type Kubernetes

type Kubernetes interface {
	ListPods(labels map[string]string) (*PodList, error)
	UpdatePod(podName string, pod *Pod) (*Pod, error)
	WatchPods(labels map[string]string) (watch.Watch, error)
}

Kubernetes ...

func NewClientByHost

func NewClientByHost(host string) Kubernetes

NewClientByHost sets up a client by host

func NewClientInCluster

func NewClientInCluster() Kubernetes

NewClientInCluster should work similarily to the official api NewInClient by setting up a client configuration for use within a k8s pod.

type Meta

type Meta struct {
	Name        string             `json:"name,omitempty"`
	Labels      map[string]*string `json:"labels,omitempty"`
	Annotations map[string]*string `json:"annotations,omitempty"`
}

Meta ...

type Pod

type Pod struct {
	Metadata *Meta   `json:"metadata"`
	Status   *Status `json:"status"`
}

Pod is the top level item for a pod

type PodList

type PodList struct {
	Items []Pod `json:"items"`
}

PodList ...

type Status

type Status struct {
	PodIP string `json:"podIP"`
	Phase string `json:"phase"`
}

Status ...

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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