statesinformer

package
v0.0.0-...-f9d3faf Latest Latest
Warning

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

Go to latest
Published: Mar 16, 2023 License: Apache-2.0 Imports: 35 Imported by: 0

Documentation

Index

Constants

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

Variables

This section is empty.

Functions

func NewCallbackRunner

func NewCallbackRunner() *callbackRunner

func NewNodeInformer

func NewNodeInformer() *nodeInformer

func NewPodsInformer

func NewPodsInformer() *podsInformer

Types

type Config

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

func NewDefaultConfig

func NewDefaultConfig() *Config

func (*Config) InitFlags

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

type KubeletStub

type KubeletStub interface {
	GetAllPods() (corev1.PodList, error)
	GetKubeletConfiguration() (*kubeletconfiginternal.KubeletConfiguration, 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

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

func (RegisterType) String

func (r RegisterType) String() string

type StatesInformer

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

	GetNode() *corev1.Node

	GetAllPods() []*PodMeta

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

func NewStatesInformer

func NewStatesInformer(config *Config, kubeClient clientset.Interface, nodeName string) StatesInformer

type UpdateCbCtx

type UpdateCbCtx struct{}

type UpdateCbFn

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

Jump to

Keyboard shortcuts

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