k8s

package
v1.2.0 Latest Latest
Warning

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

Go to latest
Published: Mar 21, 2017 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func HasNamespace added in v1.2.0

func HasNamespace(ingress *v1beta1.Ingress, namespaces Namespaces) bool

HasNamespace checks if the ingress is in one of the namespaces

func NewListWatchFromClient added in v1.2.0

func NewListWatchFromClient(c cache.Getter, resource string, namespace string, fieldSelector fields.Selector, labelSelector labels.Selector) *cache.ListWatch

NewListWatchFromClient creates a new ListWatch from the specified client, resource, namespace, field selector and label selector. Extends cache.NewListWatchFromClient to support labelSelector

Types

type Client

type Client interface {
	GetIngresses(namespaces Namespaces) []*v1beta1.Ingress
	GetService(namespace, name string) (*v1.Service, bool, error)
	GetEndpoints(namespace, name string) (*v1.Endpoints, bool, error)
	WatchAll(labelSelector string, stopCh <-chan struct{}) (<-chan interface{}, error)
}

Client is a client for the Kubernetes master. WatchAll starts the watch of the Kubernetes ressources and updates the stores. The stores can then be accessed via the Get* functions.

func NewClient

func NewClient(endpoint string) (Client, error)

NewClient returns a new Kubernetes client

type Namespaces added in v1.2.0

type Namespaces []string

Namespaces holds kubernetes namespaces

func (*Namespaces) Get added in v1.2.0

func (ns *Namespaces) Get() interface{}

Get []string

func (*Namespaces) Set added in v1.2.0

func (ns *Namespaces) Set(str string) error

Set adds strings elem into the the parser it splits str on , and ;

func (*Namespaces) SetValue added in v1.2.0

func (ns *Namespaces) SetValue(val interface{})

SetValue sets []string into the parser

func (*Namespaces) String added in v1.2.0

func (ns *Namespaces) String() string

String return slice in a string

Jump to

Keyboard shortcuts

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