Documentation ¶
Index ¶
- func NewClientSet(kubeConfig string) (*kubernetes.Clientset, error)
- type EndpointsListener
- type EndpointsWatcher
- type InMemoryPodIndex
- type MockEndpointsWatcher
- func (m *MockEndpointsWatcher) GetService(service string) (*v1.Service, bool, error)
- func (m *MockEndpointsWatcher) Run() error
- func (m *MockEndpointsWatcher) Stop()
- func (m *MockEndpointsWatcher) Subscribe(service string, port uint32, listener EndpointsListener) error
- func (m *MockEndpointsWatcher) Unsubscribe(service string, port uint32, listener EndpointsListener) error
- type PodIndex
- type ReplicaSetStore
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) NoEndpoints(exists bool) }
type EndpointsWatcher ¶
type EndpointsWatcher interface { GetService(service string) (*v1.Service, bool, error) Subscribe(service string, port uint32, listener EndpointsListener) error Unsubscribe(service string, port uint32, listener EndpointsListener) error Run() error Stop() }
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.
type InMemoryPodIndex ¶ added in v0.4.0
func (*InMemoryPodIndex) GetPod ¶ added in v0.4.0
func (i *InMemoryPodIndex) GetPod(key string) (*v1.Pod, error)
func (*InMemoryPodIndex) GetPodsByIndex ¶ added in v0.4.0
func (i *InMemoryPodIndex) GetPodsByIndex(key string) ([]*v1.Pod, error)
func (*InMemoryPodIndex) List ¶ added in v0.4.0
func (i *InMemoryPodIndex) List() ([]*v1.Pod, error)
func (*InMemoryPodIndex) Run ¶ added in v0.4.0
func (i *InMemoryPodIndex) Run() error
func (*InMemoryPodIndex) Stop ¶ added in v0.4.0
func (i *InMemoryPodIndex) Stop()
type MockEndpointsWatcher ¶ added in v0.4.0
type MockEndpointsWatcher struct { HostReceived string ListenerSubscribed EndpointsListener ListenerUnsubscribed EndpointsListener ServiceToReturn *v1.Service ExistsToReturn bool ErrToReturn error }
func (*MockEndpointsWatcher) GetService ¶ added in v0.4.0
func (*MockEndpointsWatcher) Run ¶ added in v0.4.0
func (m *MockEndpointsWatcher) Run() error
func (*MockEndpointsWatcher) Stop ¶ added in v0.4.0
func (m *MockEndpointsWatcher) Stop()
func (*MockEndpointsWatcher) Subscribe ¶ added in v0.4.0
func (m *MockEndpointsWatcher) Subscribe(service string, port uint32, listener EndpointsListener) error
func (*MockEndpointsWatcher) Unsubscribe ¶ added in v0.4.0
func (m *MockEndpointsWatcher) Unsubscribe(service string, port uint32, listener EndpointsListener) error
type PodIndex ¶
type PodIndex interface { GetPod(key string) (*v1.Pod, error) GetPodsByIndex(key string) ([]*v1.Pod, error) List() ([]*v1.Pod, error) Run() error Stop() }
func NewEmptyPodIndex ¶ added in v0.4.0
func NewEmptyPodIndex() PodIndex
func NewPodIndex ¶
func NewPodsByIp ¶ added in v0.4.0
func NewPodsByIp(clientSet *kubernetes.Clientset) (PodIndex, error)
NewPodsByIp returns a PodIndex with the Pod's IP as its key.
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)
GetDeploymentForPod returns pod owner information: if the pod's replicaset belongs to a deployment: "namespace/deployment" if the pod's replicaset does not belong to a deployment: "namespace/replicaset"
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()
Click to show internal directories.
Click to hide internal directories.