Documentation ¶
Index ¶
- Constants
- func DeleteAllPodDeleteMilestone(cluster string) *utils.SafeMap
- func EnsureIndex(client *elastic.Client, index, mapping string) error
- func EnsurePipeline(client *elastic.Client, index, mapping string) error
- func GetAllPodDeleteMilestoneByScroll(cluster string) (*utils.SafeMap, error)
- func GetIndexNameForPodDeleteMileStone(cluster string) string
- func GetSloPodInfoIndexByDocID(docID string) string
- func GetXSearchClient() *elastic.Client
- func InitSloPodInfo(cluster string, podInfoCacheUid utils.LRU) error
- func InitZsearch(zsearchEndPoint, username, password string, extraInfo interface{})
- func SaveDeleteSloMilestoneMapToZsearch(podDeleteMileStoneMap *utils.SafeMap)
- func SaveNodeYaml(cluster string, node *corev1.Node, t time.Time, auditID string) error
- func SavePodInfoToZSearch(cluster string, pod *corev1.Pod, deliveryStatus string, currentTime time.Time, ...) error
- func SavePodLifePhase(clusterName string, namespace string, podUID string, podName string, ...) error
- func SavePodYaml(cluster string, pod *corev1.Pod, t time.Time, auditID string, ...) error
- func SaveSloData(cluster string, namespace string, podName string, podUID string, ...) error
- func SaveSloTraceData(cluster string, namespace string, name string, uid string, sloType string, ...) error
- func Scroll(client *elastic.Client, index string, query elastic.Query, ...) error
- type Cleaner
- type CondLocker
- type ElasticSearchConf
- type PodDeleteMileStone
- type PodYamlDic
- type SloPodInfo
Constants ¶
View Source
const ( PodDeleteMileStoneIndex = "pod_delete_milestone_cache" PodDeleteMileStoneType = "_doc" )
Variables ¶
This section is empty.
Functions ¶
func DeleteAllPodDeleteMilestone ¶
删除所有 podDeleteMileStone
func EnsureIndex ¶
EnsureIndex to check if an index exists, create it if not exists.
func EnsurePipeline ¶
func GetAllPodDeleteMilestoneByScroll ¶
获取所有 PodDeleteMilestone
func GetSloPodInfoIndexByDocID ¶
查询一个 PodInfo 所属于的 Index 由于 slo_pod_info 是天级别的索引,需要先找到这个 docID 对应的索引名称,然后再写入
func GetXSearchClient ¶
func GetXSearchClient() *elastic.Client
func InitSloPodInfo ¶
查询 SLO Pod
func InitZsearch ¶
func InitZsearch(zsearchEndPoint, username, password string, extraInfo interface{})
func SaveNodeYaml ¶
func SavePodInfoToZSearch ¶
func SavePodLifePhase ¶
func SavePodYaml ¶
func SaveSloData ¶
func SaveSloTraceData ¶
Types ¶
type Cleaner ¶
type Cleaner []func()
var (
XSearchClear Cleaner
)
func (*Cleaner) AddCleanWork ¶
func (c *Cleaner) AddCleanWork(w func())
type CondLocker ¶
type CondLocker struct {
// contains filtered or unexported fields
}
type ElasticSearchConf ¶
type ElasticSearchConf struct { Endpoint string User string Password string Index string Type string }
var EsConfig *ElasticSearchConf
type PodDeleteMileStone ¶
type PodDeleteMileStone struct { Cluster string Namespace string PodName string PodUID string Type string TrigerAuditLog string NodeIP string DeleteResult string //删除结果:success、failed reason KubeletKillingHost string DebugUrl string HostingStatus string //删除托管状态 CreatedTime time.Time DeleteEndTime time.Time KubeletKillingTime time.Time LifeDuration time.Duration // DeletionTimeStamp - CreationTimeStamp RemainingFinalizers []string DeleteTimeoutTime time.Time IsJob bool Key string Mutex sync.Mutex }
pod删除SLO相关
type PodYamlDic ¶
SavePodYaml save pod yaml
type SloPodInfo ¶
Click to show internal directories.
Click to hide internal directories.