Documentation ¶
Index ¶
- func CreateHandler(h CacheHandler) cache.ResourceEventHandler
- type CacheHandler
- type NodeLister
- type SchedCache
- func (c SchedCache) GetHost(node string) string
- func (c SchedCache) GetNodes(host string) []string
- func (c SchedCache) GetPodsOnNode(nodename string) []string
- func (c *SchedCache) ListNode() ([]*v1.Node, error)
- func (c *SchedCache) ListPod(selector selector.Selector) ([]*v1.Pod, error)
- func (c *SchedCache) NodeInformer() cache.SharedIndexInformer
- func (c *SchedCache) PodInformer() cache.SharedIndexInformer
- func (c *SchedCache) Run(stopCh <-chan struct{})
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CreateHandler ¶
func CreateHandler(h CacheHandler) cache.ResourceEventHandler
CreateHandler creates a cache.ResourceEventHandler from CacheHandler
Types ¶
type CacheHandler ¶
type CacheHandler interface { Add(obj interface{}) Update(old, new interface{}) Delete(obj interface{}) }
CacheHandler is the interface for cache updates from external source.
type NodeLister ¶
type NodeLister interface { // ListNode list all nodes in Kubernetes cluster ListNode() ([]*v1.Node, error) }
NodeLister list nodes
type SchedCache ¶
type SchedCache struct {
// contains filtered or unexported fields
}
SchedCache is the cache for scheduler
func (SchedCache) GetPodsOnNode ¶
func (*SchedCache) ListNode ¶
func (c *SchedCache) ListNode() ([]*v1.Node, error)
ListNode lists all nodes cached in SchedCached
func (*SchedCache) NodeInformer ¶
func (c *SchedCache) NodeInformer() cache.SharedIndexInformer
NodeInformer returns the SharedIndexInformer for nodes
func (*SchedCache) PodInformer ¶
func (c *SchedCache) PodInformer() cache.SharedIndexInformer
PodInformer returns the SharedIndexInformer for pods
func (*SchedCache) Run ¶
func (c *SchedCache) Run(stopCh <-chan struct{})
Run starts the shared informer in cache, which will be stopped when stopCh is closed.
Click to show internal directories.
Click to hide internal directories.