rainbond: github.com/goodrain/rainbond/node/kubecache Index | Files

package kubecache

import "github.com/goodrain/rainbond/node/kubecache"


Package Files


type Event Uses

type Event struct {
    Type EventType
    Obj  interface{}

Event holds the context of an event.

type EventType Uses

type EventType string

EventType -

const (
    //EvictionKind EvictionKind
    EvictionKind = "Eviction"
    //EvictionSubresource EvictionSubresource
    EvictionSubresource = "pods/eviction"
    // CreateEvent event associated with new objects in an informer
    CreateEvent EventType = "CREATE"
    // UpdateEvent event associated with an object update in an informer
    UpdateEvent EventType = "UPDATE"
    // DeleteEvent event associated when an object is removed from an informer
    DeleteEvent EventType = "DELETE"

type KubeClient Uses

type KubeClient interface {
    UpK8sNode(*client.HostNode) (*v1.Node, error)
    DownK8sNode(nodename string) error
    GetAllPods() (pods []*v1.Pod, err error)
    GetPods(namespace string) (pods []*v1.Pod, err error)
    GetPodsBySelector(namespace string, selector labels.Selector) (pods []*v1.Pod, err error)
    GetNodeByName(nodename string) (*v1.Node, error)
    GetNodes() ([]*v1.Node, error)
    GetNode(nodeName string) (*v1.Node, error)
    CordonOrUnCordon(nodeName string, drain bool) (*v1.Node, error)
    UpdateLabels(nodeName string, labels map[string]string) (*v1.Node, error)
    DeleteOrEvictPodsSimple(nodeName string) error
    GetPodsByNodes(nodeName string) (pods []v1.Pod, err error)
    GetEndpoints(namespace string, selector labels.Selector) ([]*v1.Endpoints, error)
    GetServices(namespace string, selector labels.Selector) ([]*v1.Service, error)
    GetConfig(namespace string, selector labels.Selector) ([]*v1.ConfigMap, error)

KubeClient KubeClient

func NewKubeClient Uses

func NewKubeClient(cfg *conf.Conf, clientset kubernetes.Interface) (KubeClient, error)

NewKubeClient NewKubeClient

Package kubecache imports 20 packages (graph) and is imported by 6 packages. Updated 2020-04-09. Refresh now. Tools for package owners.