Documentation ¶
Overview ¶
Package servicemonitor prometheus service monitor
Index ¶
- Constants
- func BatchDeleteServiceMonitor(c *rest.Context) (interface{}, error)
- func CreateServiceMonitor(c *rest.Context) (interface{}, error)
- func DeleteServiceMonitor(c *rest.Context) (interface{}, error)
- func GetMonitoringV1Client(c *rest.Context) (monitoringv1.MonitoringV1Interface, error)
- func GetServiceMonitor(c *rest.Context) (interface{}, error)
- func ListServiceMonitors(c *rest.Context) (interface{}, error)
- func UpdateServiceMonitor(c *rest.Context) (interface{}, error)
- type BatchDeleteServiceMonitorReq
- type CreateServiceMonitorReq
- type ServiceMonitor
- type UpdateServiceMonitorReq
Constants ¶
const SampleLimitMax = 100000
SampleLimitMax xxx
const SampleLimitMin = 1
SampleLimitMin xxx
Variables ¶
This section is empty.
Functions ¶
func BatchDeleteServiceMonitor ¶
BatchDeleteServiceMonitor 批量删除ServiceMonitor @Summary 批量删除ServiceMonitor @Tags Metrics @Success 200 {string} string @Router /service_monitors/batchdelete [delete]
func CreateServiceMonitor ¶
CreateServiceMonitor 创建ServiceMonitor @Summary ServiceMonitor列表数据 @Tags Metrics @Success 200 {string} string @Router /service_monitors/create/namespaces/:namespace/servicemonitors/:name [post]
func DeleteServiceMonitor ¶
DeleteServiceMonitor 删除ServiceMonitor @Summary 删除ServiceMonitor @Tags Metrics @Success 200 {string} string @Router /service_monitors/namespaces/:namespace/servicemonitors/:name [delete]
func GetMonitoringV1Client ¶
func GetMonitoringV1Client(c *rest.Context) (monitoringv1.MonitoringV1Interface, error)
GetMonitoringV1Client get monitoring client
func GetServiceMonitor ¶
GetServiceMonitor 获取单个ServiceMonitor @Summary 删除ServiceMonitor @Tags Metrics @Success 200 {string} string @Router /service_monitors/namespaces/:namespace/servicemonitors/:name [delete]
func ListServiceMonitors ¶
ListServiceMonitors 获取ServiceMonitor列表数据 @Summary ServiceMonitor列表数据 @Tags Metrics @Success 200 {string} string @Router /service_monitors/namespaces/:namespace [get]
func UpdateServiceMonitor ¶
UpdateServiceMonitor 创建ServiceMonitor @Summary ServiceMonitor列表数据 @Tags Metrics @Success 200 {string} string @Router /service_monitors/update/namespaces/:namespace/servicemonitors/:name [put]
Types ¶
type BatchDeleteServiceMonitorReq ¶
type BatchDeleteServiceMonitorReq struct {
ServiceMonitors []ServiceMonitor `json:"service_monitors"`
}
BatchDeleteServiceMonitorReq batch delete service monitor req
type CreateServiceMonitorReq ¶
type CreateServiceMonitorReq struct { ServiceName string `json:"service_name"` Path string `json:"path"` Selector map[string]string `json:"selector"` Interval string `json:"interval"` Port string `json:"port"` SampleLimit int `json:"sample_limit"` Namespace string `json:"namespace"` Name string `json:"name"` Params map[string]string `json:"params"` }
CreateServiceMonitorReq create service monitor req
func (CreateServiceMonitorReq) Validate ¶
func (r CreateServiceMonitorReq) Validate() bool
Validate validate
type ServiceMonitor ¶
ServiceMonitor service monitor
type UpdateServiceMonitorReq ¶
type UpdateServiceMonitorReq struct { ServiceName string `json:"service_name"` Path string `json:"path"` Selector map[string]string `json:"selector"` Interval string `json:"interval"` Port string `json:"port"` SampleLimit int `json:"sample_limit"` Namespace string `json:"namespace"` Name string `json:"name"` Params map[string]string `json:"params"` }
UpdateServiceMonitorReq update service monitor req
func (UpdateServiceMonitorReq) Validate ¶
func (r UpdateServiceMonitorReq) Validate() bool
Validate 校验参数