servicemonitor

package
v0.0.0-...-344df76 Latest Latest
Warning

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

Go to latest
Published: Apr 26, 2024 License: MIT Imports: 11 Imported by: 0

Documentation

Overview

Package servicemonitor prometheus service monitor

Index

Constants

View Source
const SampleLimitMax = 100000

SampleLimitMax xxx

View Source
const SampleLimitMin = 1

SampleLimitMin xxx

Variables

This section is empty.

Functions

func BatchDeleteServiceMonitor

func BatchDeleteServiceMonitor(c *rest.Context) (interface{}, error)

BatchDeleteServiceMonitor 批量删除ServiceMonitor @Summary 批量删除ServiceMonitor @Tags Metrics @Success 200 {string} string @Router /service_monitors/batchdelete [delete]

func CreateServiceMonitor

func CreateServiceMonitor(c *rest.Context) (interface{}, error)

CreateServiceMonitor 创建ServiceMonitor @Summary ServiceMonitor列表数据 @Tags Metrics @Success 200 {string} string @Router /service_monitors/create/namespaces/:namespace/servicemonitors/:name [post]

func DeleteServiceMonitor

func DeleteServiceMonitor(c *rest.Context) (interface{}, error)

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

func GetServiceMonitor(c *rest.Context) (interface{}, error)

GetServiceMonitor 获取单个ServiceMonitor @Summary 删除ServiceMonitor @Tags Metrics @Success 200 {string} string @Router /service_monitors/namespaces/:namespace/servicemonitors/:name [delete]

func ListServiceMonitors

func ListServiceMonitors(c *rest.Context) (interface{}, error)

ListServiceMonitors 获取ServiceMonitor列表数据 @Summary ServiceMonitor列表数据 @Tags Metrics @Success 200 {string} string @Router /service_monitors/namespaces/:namespace [get]

func UpdateServiceMonitor

func UpdateServiceMonitor(c *rest.Context) (interface{}, error)

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

type ServiceMonitor struct {
	Namespace string `json:"namespace"`
	Name      string `json:"name"`
}

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 校验参数

Jump to

Keyboard shortcuts

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