Documentation
¶
Index ¶
- type Watcher
- func (watcher *Watcher) GetNodeByInternalIP(ip string) (*corev1.Node, error)
- func (watcher *Watcher) GetNodeByName(name string) (*corev1.Node, error)
- func (watcher *Watcher) GetPodsByIP(ip string) ([]*corev1.Pod, error)
- func (watcher *Watcher) GetServiceByClusterIP(ip string) (*corev1.Service, error)
- type WatcherInterface
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Watcher ¶
type Watcher struct {
// contains filtered or unexported fields
}
Watcher implements WatcherInterface.
func NewWatcher ¶
func NewWatcher(cluster string, clientset kubernetes.Interface) (*Watcher, error)
NewWatcher creates a new Watcher and checks that it has connectivity to the cluster API.
func (*Watcher) GetNodeByInternalIP ¶
GetNodeByInternalIP takes an IP and finds the node which is represented with the IP. err is nil if there is no such node.
func (*Watcher) GetNodeByName ¶
GetNodeByName takes a name and finds the node with that name. err is nil if there is no such node.
func (*Watcher) GetPodsByIP ¶
GetPodsByIP takes an IP and finds pods on that IP. err is nil if there are no such pods.
type WatcherInterface ¶
type WatcherInterface interface {
GetPodsByIP(ip string) ([]*corev1.Pod, error)
GetNodeByInternalIP(ip string) (*corev1.Node, error)
GetNodeByName(name string) (*corev1.Node, error)
GetServiceByClusterIP(ip string) (*corev1.Service, error)
}
WatcherInterface watches Kubernetes cluster for update.
Click to show internal directories.
Click to hide internal directories.