statesinformer

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Jun 30, 2022 License: Apache-2.0 Imports: 38 Imported by: 1

Documentation

Index

Constants

View Source
const (
	HTTPScheme  = "http"
	HTTPSScheme = "https"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	KubeletPreferredAddressType string
	KubeletSyncInterval         time.Duration
	KubeletSyncTimeout          time.Duration
	InsecureKubeletTLS          bool
	KubeletReadOnlyPort         uint
	NodeTopologySyncInterval    time.Duration
}

func NewDefaultConfig

func NewDefaultConfig() *Config

func (*Config) InitFlags

func (c *Config) InitFlags(fs *flag.FlagSet)

type KubeletStub

type KubeletStub interface {
	GetAllPods() (corev1.PodList, error)
}

func NewKubeletStub

func NewKubeletStub(addr string, port int, scheme string, timeout time.Duration, cfg *rest.Config) (KubeletStub, error)

type PodMeta

type PodMeta struct {
	Pod       *corev1.Pod
	CgroupDir string
}

func (*PodMeta) DeepCopy

func (in *PodMeta) DeepCopy() *PodMeta

type RegisterType added in v0.5.0

type RegisterType int64
const (
	RegisterTypeNodeSLOSpec RegisterType = iota
	RegisterTypeAllPods
	RegisterTypeNodeTopology
)

func (RegisterType) String added in v0.5.0

func (r RegisterType) String() string

type StatesInformer

type StatesInformer interface {
	Run(stopCh <-chan struct{}) error
	HasSynced() bool

	GetNode() *corev1.Node
	GetNodeSLO() *slov1alpha1.NodeSLO

	GetAllPods() []*PodMeta

	RegisterCallbacks(objType RegisterType, name, description string, callbackFn UpdateCbFn)
}

func NewStatesInformer added in v0.2.0

func NewStatesInformer(config *Config, kubeClient clientset.Interface, crdClient koordclientset.Interface, topologyClient *topologyclientset.Clientset, metricsCache metriccache.MetricCache, pleg pleg.Pleg, nodeName string) StatesInformer

type UpdateCbCtx added in v0.5.0

type UpdateCbCtx struct{}

type UpdateCbFn added in v0.4.0

type UpdateCbFn func(t RegisterType, obj interface{}, pods []*PodMeta)

Directories

Path Synopsis
Package mock_statesinformer is a generated GoMock package.
Package mock_statesinformer is a generated GoMock package.

Jump to

Keyboard shortcuts

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