core

package
v0.0.0-...-1e5aeb1 Latest Latest
Warning

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

Go to latest
Published: Jan 6, 2021 License: Apache-2.0 Imports: 23 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Namespace = "namespace"
)
View Source
const (
	Node = "node"
)
View Source
const (
	Pod = "pod"
)
View Source
const (
	Service = "service"
)

Variables

View Source
var NamespaceManager = &NamespaceMgr{}
View Source
var NodeManager = &NodeMgr{
	staticList:   &k8sCoreV1.NodeList{},
	elemTemplate: &k8sCoreV1.Node{},
	streamCh:     make(chan k8sRuntime.Object),
}
View Source
var PodManager = &PodMgr{
	staticList:   &k8sCoreV1.PodList{},
	elemTemplate: &k8sCoreV1.Pod{},
	streamCh:     make(chan k8sRuntime.Object),
}
View Source
var ServiceManager = &ServiceMgr{}

Functions

func GetNodeAttrs

func GetNodeAttrs(obj k8sRuntime.Object) (k8sLabels.Set, k8sFields.Set, error)

GetNodeAttrs returns labels and fields of a given object for filtering purposes.

func GetPodAttrs

func GetPodAttrs(obj k8sRuntime.Object) (k8sLabels.Set, k8sFields.Set, error)

GetPodAttrs returns labels and fields of a given object for filtering purposes.

func NewListCoreV1Namespace

func NewListCoreV1Namespace() core_v1.ListCoreV1NamespaceHandler

func NewListCoreV1Node

func NewListCoreV1Node() core_v1.ListCoreV1NodeHandler

func NewPatchCoreV1Node

func NewPatchCoreV1Node() core_v1.PatchCoreV1NodeHandler

func NewPatchCoreV1NodeStatus

func NewPatchCoreV1NodeStatus() core_v1.PatchCoreV1NodeStatusHandler

func NewReadCoreV1Namespace

func NewReadCoreV1Namespace() core_v1.ReadCoreV1NamespaceHandler

func NewReadCoreV1Node

func NewReadCoreV1Node() core_v1.ReadCoreV1NodeHandler

func NodeToSelectableFields

func NodeToSelectableFields(node *k8sCoreV1.Node) k8sFields.Set

NodeToSelectableFields returns a field set that represents the object.

func ToSelectableFields

func ToSelectableFields(pod *k8sCoreV1.Pod) k8sFields.Set

ToSelectableFields returns a field set that represents the object TODO: fields are not labels, and the validation rules for them do not apply.

Types

type NamespaceConfig

type NamespaceConfig struct {
	Name string
	UUID string
}

type NamespaceMgr

type NamespaceMgr struct {
	sync.RWMutex
	// contains filtered or unexported fields
}

func (*NamespaceMgr) AddElements

func (n *NamespaceMgr) AddElements(elem int64) int64

func (*NamespaceMgr) List

func (n *NamespaceMgr) List(start, limit int64) (k8sRuntime.Object, error)

func (*NamespaceMgr) NewInterface

func (*NamespaceMgr) NewInterface() k8sRuntime.Object

func (*NamespaceMgr) NewListInterface

func (*NamespaceMgr) NewListInterface() k8sRuntime.Object

func (*NamespaceMgr) SetList

func (n *NamespaceMgr) SetList(obj k8sRuntime.Object) error

func (*NamespaceMgr) SetObj

func (n *NamespaceMgr) SetObj(obj k8sRuntime.Object) error

type NodeConfig

type NodeConfig struct {
	Name           string
	IPv4           string
	IPv6           string
	PodCIDRv4      string
	PodCIDRv6      string
	CiliumHostIP   string
	CiliumHealthIP string
	UUID           string
}

type NodeMgr

type NodeMgr struct {
	sync.RWMutex
	// contains filtered or unexported fields
}

func (*NodeMgr) AddElements

func (n *NodeMgr) AddElements(elem int64) int64

func (*NodeMgr) GenObj

func (n *NodeMgr) GenObj(idx int64) k8sRuntime.Object

func (*NodeMgr) GenObjs

func (n *NodeMgr) GenObjs(start, maxElemts int64) <-chan k8sRuntime.Object

func (*NodeMgr) List

func (n *NodeMgr) List(start, limit int64) (k8sRuntime.Object, error)

func (*NodeMgr) Log

func (*NodeMgr) Log() *logrus.Logger

func (*NodeMgr) NewInterface

func (*NodeMgr) NewInterface() k8sRuntime.Object

func (*NodeMgr) NewListInterface

func (*NodeMgr) NewListInterface() k8sRuntime.Object

func (*NodeMgr) SetList

func (n *NodeMgr) SetList(obj k8sRuntime.Object) error

func (*NodeMgr) SetObj

func (n *NodeMgr) SetObj(obj k8sRuntime.Object) error

func (*NodeMgr) Stream

func (n *NodeMgr) Stream() chan k8sRuntime.Object

type PodConfig

type PodConfig struct {
	Name      string
	HostIP    string
	PodIPs    []k8sCoreV1.PodIP
	PodIP     string
	NodeName  string
	Namespace string
	Idx       int64
	UUID      string
	PodLabels map[string]string
}

type PodMgr

type PodMgr struct {
	sync.RWMutex
	// contains filtered or unexported fields
}

func (*PodMgr) AddElements

func (p *PodMgr) AddElements(elem int64) int64

func (*PodMgr) GenObj

func (p *PodMgr) GenObj(idx int64) k8sRuntime.Object

func (*PodMgr) GenObjs

func (p *PodMgr) GenObjs(start, maxElemts int64) <-chan k8sRuntime.Object

func (*PodMgr) List

func (p *PodMgr) List(start, limit int64) (k8sRuntime.Object, error)

func (*PodMgr) Log

func (*PodMgr) Log() *logrus.Logger

func (*PodMgr) NewInterface

func (*PodMgr) NewInterface() k8sRuntime.Object

func (*PodMgr) NewListInterface

func (*PodMgr) NewListInterface() k8sRuntime.Object

func (*PodMgr) SetList

func (p *PodMgr) SetList(obj k8sRuntime.Object) error

func (*PodMgr) SetObj

func (p *PodMgr) SetObj(obj k8sRuntime.Object) error

func (*PodMgr) Stream

func (p *PodMgr) Stream() chan k8sRuntime.Object

type ServiceConfig

type ServiceConfig struct {
	Name        string
	Namespace   string
	ClusterIPv4 string
	ClusterIPv6 string
	UID         string
}

type ServiceMgr

type ServiceMgr struct {
	sync.RWMutex
	// contains filtered or unexported fields
}

func (*ServiceMgr) AddElements

func (svcMgr *ServiceMgr) AddElements(elem int64) int64

func (*ServiceMgr) List

func (svcMgr *ServiceMgr) List(start, limit int64) (k8sRuntime.Object, error)

func (*ServiceMgr) NewInterface

func (*ServiceMgr) NewInterface() k8sRuntime.Object

func (*ServiceMgr) NewListInterface

func (*ServiceMgr) NewListInterface() k8sRuntime.Object

func (*ServiceMgr) SetList

func (svcMgr *ServiceMgr) SetList(obj k8sRuntime.Object) error

func (*ServiceMgr) SetObj

func (svcMgr *ServiceMgr) SetObj(obj k8sRuntime.Object) error

Jump to

Keyboard shortcuts

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