kubernetes

package
v0.0.0-...-80bedfa Latest Latest
Warning

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

Go to latest
Published: May 3, 2019 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BuildConfigFromFlags

func BuildConfigFromFlags(apiserver, kubecfg string) (*rest.Config, error)

BuildConfigFromFlags is clientcmd.BuildConfigFromFlags with no annoying dependencies on glog. https://godoc.org/k8s.io/client-go/tools/clientcmd#BuildConfigFromFlags

func NewEventRecorder

func NewEventRecorder(c kubernetes.Interface) record.EventRecorder

NewEventRecorder returns a new record.EventRecorder for the given client.

Types

type IngressStore

type IngressStore interface {
	// Get an ingress by namespace and name. Returns an error if the ingress
	// does not exist.
	Get(namespace, name string) (*v1beta1.Ingress, error)
}

An IngressStore is a cache of ingress resources.

type IngressWatch

type IngressWatch struct {
	cache.SharedInformer
}

An IngressWatch is a cache of ingress resources that notifies registered handlers when its contents change.

func NewIngressWatch

func NewIngressWatch(client kubernetes.Interface, rs ...cache.ResourceEventHandler) *IngressWatch

NewIngressWatch creates a watch on ingress resources. Ingresses are cached and the provided ResourceEventHandlers are called when the cache changes.

func (*IngressWatch) Get

func (w *IngressWatch) Get(namespace, name string) (*v1beta1.Ingress, error)

Get an ingress by namespace and name. Returns an error if the ingress does not exist.

type SecretStore

type SecretStore interface {
	// Get an secret by namespace and name. Returns an error if the secret does
	// not exist.
	Get(namespace, name string) (*v1.Secret, error)
}

A SecretStore is a cache of secret resources.

type SecretWatch

type SecretWatch struct {
	cache.SharedInformer
}

A SecretWatch is a cache of ingress resources that notifies registered handlers when its contents change.

func NewSecretWatch

func NewSecretWatch(client kubernetes.Interface, rs ...cache.ResourceEventHandler) *SecretWatch

NewSecretWatch creates a watch on secret resources. Secrets are cached and the provided ResourceEventHandlers are called when the cache changes.

func (*SecretWatch) Get

func (w *SecretWatch) Get(namespace, name string) (*v1.Secret, error)

Get an secret by namespace and name. Returns an error if the secret does not exist.

type SynchronousResourceEventHandler

type SynchronousResourceEventHandler struct {
	// contains filtered or unexported fields
}

A SynchronousResourceEventHandler forwards all events

func NewSynchronousResourceEventHandler

func NewSynchronousResourceEventHandler(h cache.ResourceEventHandler, buffer int) *SynchronousResourceEventHandler

NewSynchronousResourceEventHandler returns a new ResourceEventHandler which passes all handled events to the supplied ResourceEventHandler synchronously. Events are buffered. When the the supplied buffer size is exhausted the handler will block.

func (*SynchronousResourceEventHandler) OnAdd

func (b *SynchronousResourceEventHandler) OnAdd(obj interface{})

OnAdd forwards notifications of new resources.

func (*SynchronousResourceEventHandler) OnDelete

func (b *SynchronousResourceEventHandler) OnDelete(obj interface{})

OnDelete forwards notifications of deleted resources.

func (*SynchronousResourceEventHandler) OnUpdate

func (b *SynchronousResourceEventHandler) OnUpdate(oldObj, newObj interface{})

OnUpdate forwards notifications of updated resources.

func (*SynchronousResourceEventHandler) Run

func (b *SynchronousResourceEventHandler) Run(stop <-chan struct{})

Run until the provided stop channel is closed.

Jump to

Keyboard shortcuts

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