podmonitor

package
v0.0.0-...-b68b228 Latest Latest
Warning

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

Go to latest
Published: Dec 20, 2024 License: MIT Imports: 8 Imported by: 0

Documentation

Overview

Package podmonitor prometheus pods monitor

Index

Constants

View Source
const SampleLimitMax = 100000

SampleLimitMax xxx

View Source
const SampleLimitMin = 1

SampleLimitMin xxx

Variables

This section is empty.

Functions

func BatchDeletePodMonitor

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

BatchDeletePodMonitor 批量删除PodMonitor @Summary 批量删除PodMonitor @Tags Metrics @Success 200 {string} string @Router /pod_monitors/batchdelete [post]

func CreatePodMonitor

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

CreatePodMonitor 创建PodMonitor @Summary PodMonitor列表数据 @Tags Metrics @Success 200 {string} string @Router /namespaces/:namespace/pod_monitors [post]

func DeletePodMonitor

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

DeletePodMonitor 删除PodMonitor @Summary 删除PodMonitor @Tags Metrics @Success 200 {string} string @Router /namespaces/:namespace/pod_monitors/:name [delete]

func GetPodMonitor

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

GetPodMonitor 获取单个PodMonitor @Summary 删除PodMonitor @Tags Metrics @Success 200 {string} string @Router /namespaces/:namespace/pod_monitors/:name [get]

func ListPodMonitors

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

ListPodMonitors 获取PodMonitor列表数据 @Summary PodMonitor列表数据 @Tags Metrics @Success 200 {string} string @Router /namespaces/:namespace/pod_monitors [get]

func UpdatePodMonitor

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

UpdatePodMonitor 创建PodMonitor @Summary PodMonitor列表数据 @Tags Metrics @Success 200 {string} string @Router /namespaces/:namespace/pod_monitors/:name [put]

Types

type BatchDeletePodMonitorReq

type BatchDeletePodMonitorReq struct {
	PodMonitors []PodMonitor `json:"pod_monitors"`
}

BatchDeletePodMonitorReq batch delete pod monitor req

type CreatePodMonitorReq

type CreatePodMonitorReq 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"`
}

CreatePodMonitorReq create pod monitor req

func (CreatePodMonitorReq) Validate

func (r CreatePodMonitorReq) Validate() bool

Validate validate

type PodMonitor

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

PodMonitor pod monitor

type UpdatePodMonitorReq

type UpdatePodMonitorReq 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"`
}

UpdatePodMonitorReq update pod monitor req

func (UpdatePodMonitorReq) Validate

func (r UpdatePodMonitorReq) Validate() bool

Validate 校验参数

Jump to

Keyboard shortcuts

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