k8s

package
v1.2.0-rc2 Latest Latest
Warning

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

Go to latest
Published: Mar 1, 2017 License: MIT Imports: 13 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 NewInClusterClient

func NewInClusterClient() (Client, error)

NewInClusterClient returns a new Kubernetes client that expect to run inside the cluster

func NewInClusterClientWithEndpoint

func NewInClusterClientWithEndpoint(endpoint string) (Client, error)

NewInClusterClientWithEndpoint is the same as NewInClusterClient but uses the provided endpoint URL

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