Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type HTTPMetricConfig ¶
type HTTPMetricConfig struct {
MetricName string `json:"metricName"` // 指标名称
}
type InKubeConfig ¶
type InKubeConfig struct { // Target is the target kube object, if is empty, means current pod Target *TargetKubeObject `json:"target,omitempty"` JsonPath *string `json:"jsonPath,omitempty"` // JsonPatch中的路径 AnnotationKey *string `json:"annotationKey,omitempty"` // Pod 注解的键名 LabelKey *string `json:"labelKey,omitempty"` // Pod 注解的键名 MarkerPolices []ProbeMarkerPolicy `json:"markerPolices,omitempty"` // 适用于 ProbeMarkerPolicy 的配置 // contains filtered or unexported fields }
InKubeConfig is the configuration for storing data in kube object
func (*InKubeConfig) GetPolicyOfState ¶
func (c *InKubeConfig) GetPolicyOfState(state string) (*ProbeMarkerPolicy, bool)
func (*InKubeConfig) IsValid ¶
func (c *InKubeConfig) IsValid() error
func (*InKubeConfig) Preprocess ¶
func (c *InKubeConfig) Preprocess()
type JSONPathConfig ¶
type PersistentConfig ¶
func (*PersistentConfig) GetPersistenceInfo ¶
func (p *PersistentConfig) GetPersistenceInfo() error
func (*PersistentConfig) SetPersistenceInfo ¶
func (p *PersistentConfig) SetPersistenceInfo() error
type ProbeMarkerPolicy ¶
type ProbeMarkerPolicy struct { // probe status, // For example: State=Succeeded, annotations[controller.kubernetes.io/pod-deletion-cost] = '10'. // State=Failed, annotations[controller.kubernetes.io/pod-deletion-cost] = '-10'. // In addition, if State=Failed is not defined, probe execution fails, and the annotations[controller.kubernetes.io/pod-deletion-cost] will be Deleted State string `json:"state"` // Patch Labels pod.labels Labels map[string]string `json:"labels,omitempty"` // Patch annotations pod.annotations Annotations map[string]string `json:"annotations,omitempty"` }
ProbeMarkerPolicy convert prob value to user defined values
type StorageConfig ¶
type StorageConfig struct { Type StorageType `json:"type"` // 存储类型 InKube *InKubeConfig `json:"inKube,omitempty"` HTTPMetric *HTTPMetricConfig `json:"httpMetric,omitempty"` // 适用于 HTTP 指标的配 }
func (*StorageConfig) StoreData ¶
func (s *StorageConfig) StoreData(factory StorageFactory, data string) error
type StorageFactory ¶
type StorageFactory interface {
GetStorage(storageType StorageType) (Storage, error)
}
func NewStorageFactory ¶
func NewStorageFactory(mgr api.SidecarManager) StorageFactory
type StorageType ¶
type StorageType string
const ( // StorageTypeInKube represent store in kube object StorageTypeInKube StorageType = "InKube" StorageTypeHTTPMetric StorageType = "HTTPMetric" )
type TargetKubeObject ¶
type TargetKubeObject struct { Group string `json:"group,omitempty"` // CRD 中的 Group 名称 Version string `json:"version"` // CRD 中的版本 Resource string `json:"resource"` // CRD 中的 resource 名称,一般都是复数形式,比如pods Namespace string `json:"namespace,omitempty" parse:"true"` // CRD 中的 namespace 名称 Name string `json:"name" parse:"true"` // CRD 中的名称 PodOwner bool `json:"podOwner,omitempty"` // 是否是 Pod 的拥有者 }
TargetKubeObject is the target kube object
func (*TargetKubeObject) IsValid ¶
func (t *TargetKubeObject) IsValid() error
func (*TargetKubeObject) ToGvr ¶
func (t *TargetKubeObject) ToGvr() schema.GroupVersionResource
Click to show internal directories.
Click to hide internal directories.