watchdog

package
v1.1.5 Latest Latest
Warning

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

Go to latest
Published: May 10, 2021 License: Apache-2.0, BSD-2-Clause, BSD-3-Clause, + 8 more Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetActivePods

func GetActivePods() map[string]*v1.Pod

GetActivePods get all active pods from podCache and returns them.

func GetPod added in v1.1.3

func GetPod(namespace, name string) (*v1.Pod, error)

func NewNodeLabeler

func NewNodeLabeler(client v1core.CoreV1Interface, hostname string, labels map[string]string) *nodeLabeler

NewNodeLabeler returns a new nodeLabeler

func NewPodCache

func NewPodCache(client kubernetes.Interface, hostName string)

NewPodCache creates a new podCache

func NewPodCacheForTest

func NewPodCacheForTest(client kubernetes.Interface)

NewPodCacheForTest creates a new podCache for testing

Types

type PodCache

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

PodCache contains a podInformer of pod

func (*PodCache) OnAdd

func (p *PodCache) OnAdd(obj interface{})

OnAdd is a callback function for podInformer, do nothing for now.

func (*PodCache) OnDelete

func (p *PodCache) OnDelete(obj interface{})

OnDelete is a callback function for podInformer, do nothing for now.

func (*PodCache) OnUpdate

func (p *PodCache) OnUpdate(oldObj, newObj interface{})

OnUpdate is a callback function for podInformer, do nothing for now.

Jump to

Keyboard shortcuts

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