k8s

package
v0.0.0-...-132a432 Latest Latest
Warning

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

Go to latest
Published: Oct 13, 2016 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
	Clientset *kubernetes.Clientset
}

Client define a Kubernetes client.

func NewKubernetesClient

func NewKubernetesClient(kubeconfigPath string) (*Client, error)

NewKubernetesClient create new Kubernetes client using configuration from kubectl.

func (*Client) GetNamespaces

func (client *Client) GetNamespaces() (*v1.NamespaceList, error)

func (*Client) GetNodes

func (client *Client) GetNodes() (*v1.NodeList, error)

func (*Client) GetPods

func (client *Client) GetPods() (*v1.PodList, error)

func (*Client) GetServices

func (client *Client) GetServices() (*v1.ServiceList, error)

type Watcher

type Watcher struct {
	Pods      watch.Interface
	Services  watch.Interface
	Endpoints watch.Interface
	Out       chan messages.Message
}

Watcher define a Kubernetes watching resources

func NewKubernetesWatcher

func NewKubernetesWatcher(clientset *kubernetes.Clientset, out chan messages.Message) (*Watcher, error)

func (*Watcher) Watch

func (watcher *Watcher) Watch()

Jump to

Keyboard shortcuts

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