k8s

package
v0.1.2 Latest Latest
Warning

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

Go to latest
Published: Jan 19, 2018 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewClientSet

func NewClientSet(kubeConfig string) (*kubernetes.Clientset, error)

Types

type EndpointsListener

type EndpointsListener interface {
	Update(add []common.TcpAddress, remove []common.TcpAddress)
}

type EndpointsWatcher

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

func NewEndpointsWatcher

func NewEndpointsWatcher(clientset *kubernetes.Clientset) *EndpointsWatcher

An EndpointsWatcher watches all endpoints and services in the Kubernetes cluster. Listeners can subscribe to a particular service and port and EndpointsWatcher will publish the address set and all future changes for that service:port.

func (*EndpointsWatcher) Run

func (e *EndpointsWatcher) Run() error

func (*EndpointsWatcher) Stop

func (e *EndpointsWatcher) Stop()

func (*EndpointsWatcher) Subscribe

func (e *EndpointsWatcher) Subscribe(service string, port uint32, listener EndpointsListener) error

Subscribe to a service and service port. The provided listener will be updated each time the address set for the given service port is changed.

func (*EndpointsWatcher) Unsubscribe

func (e *EndpointsWatcher) Unsubscribe(service string, port uint32, listener EndpointsListener) error

type PodIndex

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

func NewPodIndex

func NewPodIndex(clientset *kubernetes.Clientset, index cache.IndexFunc) (*PodIndex, error)

func (*PodIndex) GetPod

func (p *PodIndex) GetPod(key string) (*v1.Pod, error)

func (*PodIndex) GetPodsByIndex

func (p *PodIndex) GetPodsByIndex(key string) ([]*v1.Pod, error)

func (*PodIndex) List

func (p *PodIndex) List() ([]*v1.Pod, error)

func (*PodIndex) Run

func (p *PodIndex) Run() error

func (*PodIndex) Stop

func (p *PodIndex) Stop()

type ReplicaSetStore

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

func NewReplicaSetStore

func NewReplicaSetStore(clientset *kubernetes.Clientset) (*ReplicaSetStore, error)

func (*ReplicaSetStore) GetDeploymentForPod

func (p *ReplicaSetStore) GetDeploymentForPod(pod *v1.Pod) (string, error)

func (*ReplicaSetStore) GetReplicaSet

func (p *ReplicaSetStore) GetReplicaSet(key string) (*v1beta1.ReplicaSet, error)

func (*ReplicaSetStore) Run

func (p *ReplicaSetStore) Run() error

func (*ReplicaSetStore) Stop

func (p *ReplicaSetStore) Stop()

Jump to

Keyboard shortcuts

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