Documentation ¶
Index ¶
- Constants
- Variables
- func GetMetaManagerMetrics() []map[string]string
- type DeferredDeletionMetaStore
- func (m *DeferredDeletionMetaStore) Get(key []string) map[string][]*ObjectWrapper
- func (m *DeferredDeletionMetaStore) List() []*ObjectWrapper
- func (m *DeferredDeletionMetaStore) RegisterSendFunc(key string, f SendFunc, interval int)
- func (m *DeferredDeletionMetaStore) Start()
- func (m *DeferredDeletionMetaStore) UnRegisterSendFunc(key string)
- type FlushCh
- type IdxFunc
- type JobCronJob
- type K8sMetaEvent
- type LinkGenerator
- type MetaCache
- type MetaManager
- func (m *MetaManager) Init(configPath string) (err error)
- func (m *MetaManager) IsReady() bool
- func (m *MetaManager) RegisterSendFunc(projectName, configName, resourceType string, sendFunc SendFunc, interval int)
- func (m *MetaManager) Run(stopCh chan struct{})
- func (m *MetaManager) UnRegisterSendFunc(projectName, configName, resourceType string)
- type NodePod
- type ObjectWrapper
- type PodConfigMap
- type PodContainer
- type PodDaemonSet
- type PodJob
- type PodMetadata
- type PodPersistentVolumeClaim
- type PodReplicaSet
- type PodService
- type PodStatefulSet
- type ReplicaSetDeployment
- type SendFunc
- type SendFuncWithStopCh
- type TimerEvent
Constants ¶
View Source
const ( // entity type POD = "pod" SERVICE = "service" DEPLOYMENT = "deployment" REPLICASET = "replicaset" STATEFULSET = "statefulset" DAEMONSET = "daemonset" CRONJOB = "cronjob" JOB = "job" NODE = "node" NAMESPACE = "namespace" CONFIGMAP = "configmap" PERSISTENTVOLUME = "persistentvolume" PERSISTENTVOLUMECLAIM = "persistentvolumeclaim" STORAGECLASS = "storageclass" INGRESS = "ingress" CONTAINER = "container" // entity link type //revive:disable:var-naming LINK_SPLIT_CHARACTER = "->" POD_NODE = "pod->node" REPLICASET_DEPLOYMENT = "replicaset->deployment" POD_REPLICASET = "pod->replicaset" POD_STATEFULSET = "pod->statefulset" POD_DAEMONSET = "pod->daemonset" JOB_CRONJOB = "job->cronjob" POD_JOB = "pod->job" POD_PERSISENTVOLUMECLAIN = "pod->persistentvolumeclaim" POD_CONFIGMAP = "pod->configmap" POD_SERVICE = "pod->service" POD_CONTAINER = "pod->container" POD_PROCESS = "pod->process" )
View Source
const ( EventTypeAdd = "add" EventTypeUpdate = "update" EventTypeDelete = "delete" EventTypeDeferredDelete = "deferredDelete" EventTypeTimer = "timer" )
Variables ¶
View Source
var AllResources = []string{ POD, SERVICE, DEPLOYMENT, REPLICASET, STATEFULSET, DAEMONSET, CRONJOB, JOB, NODE, NAMESPACE, CONFIGMAP, PERSISTENTVOLUME, PERSISTENTVOLUMECLAIM, STORAGECLASS, INGRESS, }
Functions ¶
func GetMetaManagerMetrics ¶
Types ¶
type DeferredDeletionMetaStore ¶
type DeferredDeletionMetaStore struct { // cache Items map[string]*ObjectWrapper Index map[string][]string // contains filtered or unexported fields }
func NewDeferredDeletionMetaStore ¶
func NewDeferredDeletionMetaStore(eventCh chan *K8sMetaEvent, stopCh <-chan struct{}, gracePeriod int64, keyFunc cache.KeyFunc, indexRules ...IdxFunc) *DeferredDeletionMetaStore
func (*DeferredDeletionMetaStore) Get ¶
func (m *DeferredDeletionMetaStore) Get(key []string) map[string][]*ObjectWrapper
func (*DeferredDeletionMetaStore) List ¶
func (m *DeferredDeletionMetaStore) List() []*ObjectWrapper
func (*DeferredDeletionMetaStore) RegisterSendFunc ¶
func (m *DeferredDeletionMetaStore) RegisterSendFunc(key string, f SendFunc, interval int)
func (*DeferredDeletionMetaStore) Start ¶
func (m *DeferredDeletionMetaStore) Start()
func (*DeferredDeletionMetaStore) UnRegisterSendFunc ¶
func (m *DeferredDeletionMetaStore) UnRegisterSendFunc(key string)
type FlushCh ¶
type FlushCh struct { Ch chan *K8sMetaEvent ConfigName string }
type K8sMetaEvent ¶
type K8sMetaEvent struct { //revive:enable:exported EventType string Object *ObjectWrapper }
type LinkGenerator ¶
type LinkGenerator struct {
// contains filtered or unexported fields
}
func NewK8sMetaLinkGenerator ¶
func NewK8sMetaLinkGenerator(metaCache map[string]MetaCache) *LinkGenerator
func (*LinkGenerator) GenerateLinks ¶
func (g *LinkGenerator) GenerateLinks(events []*K8sMetaEvent, linkType string) []*K8sMetaEvent
type MetaCache ¶
type MetaCache interface { Get(key []string) map[string][]*ObjectWrapper GetSize() int GetQueueSize() int List() []*ObjectWrapper RegisterSendFunc(key string, sendFunc SendFunc, interval int) UnRegisterSendFunc(key string) // contains filtered or unexported methods }
type MetaManager ¶
type MetaManager struct {
// contains filtered or unexported fields
}
func GetMetaManagerInstance ¶
func GetMetaManagerInstance() *MetaManager
func (*MetaManager) Init ¶
func (m *MetaManager) Init(configPath string) (err error)
func (*MetaManager) IsReady ¶
func (m *MetaManager) IsReady() bool
func (*MetaManager) RegisterSendFunc ¶
func (m *MetaManager) RegisterSendFunc(projectName, configName, resourceType string, sendFunc SendFunc, interval int)
func (*MetaManager) Run ¶
func (m *MetaManager) Run(stopCh chan struct{})
func (*MetaManager) UnRegisterSendFunc ¶
func (m *MetaManager) UnRegisterSendFunc(projectName, configName, resourceType string)
type ObjectWrapper ¶
type PodMetadata ¶
type PodMetadata struct { Namespace string `json:"namespace"` WorkloadName string `json:"workloadName"` WorkloadKind string `json:"workloadKind"` ServiceName string `json:"serviceName"` Labels map[string]string `json:"labels"` Envs map[string]string `json:"envs"` Images map[string]string `json:"images"` IsDeleted bool `json:"-"` }
type PodPersistentVolumeClaim ¶
type PodPersistentVolumeClaim struct { Pod *v1.Pod PersistentVolumeClaim *v1.PersistentVolumeClaim }
type PodReplicaSet ¶
type PodReplicaSet struct { ReplicaSet *app.ReplicaSet Pod *v1.Pod }
type PodStatefulSet ¶
type PodStatefulSet struct { StatefulSet *app.StatefulSet Pod *v1.Pod }
type ReplicaSetDeployment ¶
type ReplicaSetDeployment struct { Deployment *app.Deployment ReplicaSet *app.ReplicaSet }
type SendFunc ¶
type SendFunc func(events []*K8sMetaEvent)
type SendFuncWithStopCh ¶
type SendFuncWithStopCh struct { SendFunc SendFunc StopCh chan struct{} }
type TimerEvent ¶
Click to show internal directories.
Click to hide internal directories.