http

package
v4.0.4 Latest Latest
Warning

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

Go to latest
Published: Aug 4, 2021 License: Apache-2.0 Imports: 50 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var MIBS string
View Source
var RegExpExcludePatition string = "```EXCLUDE```"

Functions

func AlertNids added in v4.0.4

func AlertNids(c *gin.Context)

func Config

func Config(r *gin.Engine)

func GetChileNids

func GetChileNids(nids []string) ([]string, error)

func GetIndexByClude

func GetIndexByClude(c *gin.Context)

func GetIndexByFullTags

func GetIndexByFullTags(c *gin.Context)

func GetIndexes

func GetIndexes() []string

func GetMetrics

func GetMetrics(c *gin.Context)

func GetPatAndTimeFormat

func GetPatAndTimeFormat(tf string) (string, string)

根据配置的时间格式,获取对应的正则匹配pattern和time包用的时间格式

func GetTagPairs

func GetTagPairs(c *gin.Context)

func Node

func Node(id int64) *models.Node

func PushData

func PushData(c *gin.Context)

func QueryData

func QueryData(c *gin.Context)

func QueryDataForUI

func QueryDataForUI(c *gin.Context)

func Role

func Role(id int64) *models.Role

func Shutdown

func Shutdown()

Shutdown http server

func Start

func Start()

func TaskMeta

func TaskMeta(id int64) *models.TaskMeta

func TaskTpl

func TaskTpl(id int64) *models.TaskTpl

func Team

func Team(id int64) *models.Team

func TicketSender

func TicketSender(id int64, action, reason, reply string, result int, info interface{}) error

func User

func User(id int64) *models.User

Types

type AlertUpgrade

type AlertUpgrade struct {
	Users    []string `json:"users"`
	Groups   []string `json:"groups"`
	Duration int      `json:"duration"`
	Level    int      `json:"level"`
}

type CalcStrasDelRev

type CalcStrasDelRev struct {
	Ids []int64 `json:"ids"`
}

type ChartPutForm

type ChartPutForm struct {
	SubclassId int64  `json:"subclass_id"`
	Configs    string `json:"configs"`
}

type ChartWeight

type ChartWeight struct {
	Id     int64 `json:"id"`
	Weight int   `json:"weight"`
}

type CollectRecv

type CollectRecv struct {
	Type string          `json:"type"`
	Data json.RawMessage `json:"data"`
}

type CollectsDelRev

type CollectsDelRev struct {
	Type string  `json:"type"`
	Ids  []int64 `json:"ids"`
}

type IPForm

type IPForm struct {
	IPs []string `json:"ips"`
}

type IndexTagkvResp

type IndexTagkvResp struct {
	Nids   []string           `json:"nids"`
	Metric string             `json:"metric"`
	Tagkv  []*dataobj.TagPair `json:"tagkv"`
}

func Tagkv

func Tagkv(request NidMetricRecv) ([]IndexTagkvResp, error)

type MaskconfForm

type MaskconfForm struct {
	Nid         int64             `json:"nid"`
	Category    int               `json:"category"` //1 设备相关 2 设备无关
	Endpoints   []string          `json:"endpoints"`
	CurNidPaths map[string]string `json:"cur_nid_paths"`
	Metric      string            `json:"metric"`
	Tags        string            `json:"tags"`
	Cause       string            `json:"cause"`
	Btime       int64             `json:"btime"`
	Etime       int64             `json:"etime"`
}

func (MaskconfForm) Validate

func (f MaskconfForm) Validate()

type MetricList

type MetricList struct {
	Metrics []string `json:"metrics"`
}

func Metrics

func Metrics(request NidsRecv) (MetricList, error)

type MetricsResp

type MetricsResp struct {
	Data MetricList `json:"dat"`
	Err  string     `json:"err"`
}

type MibsDelRev

type MibsDelRev struct {
	Ids []int64 `json:"ids"`
}

type NidMetricRecv

type NidMetricRecv struct {
	Nids    []string `json:"nids"`
	Metrics []string `json:"metrics"`
}

type NidsRecv

type NidsRecv struct {
	Nids []string `json:"nids"`
}

type RegExpCheckDto

type RegExpCheckDto struct {
	Success bool                `json:"success"`
	Data    []map[string]string `json:"tags"`
}

type ScreenForm

type ScreenForm struct {
	Name string `json:"name"`
}

type ScreenPutForm

type ScreenPutForm struct {
	Name   string `json:"name"`
	NodeId int64  `json:"node_id"`
}

type ScreenSubclassForm

type ScreenSubclassForm struct {
	Name   string `json:"name"`
	Weight int    `json:"weight"`
}

func (ScreenSubclassForm) Validate

func (f ScreenSubclassForm) Validate()

type StrasDelRev

type StrasDelRev struct {
	Ids []int64 `json:"ids"`
}

type TagkvsResp

type TagkvsResp struct {
	Data []IndexTagkvResp `json:"dat"`
	Err  string           `json:"err"`
}

type TaskStderrData

type TaskStderrData struct {
	Host   string `json:"host"`
	Stderr string `json:"stderr"`
}

type TaskStdoutData

type TaskStdoutData struct {
	Host   string `json:"host"`
	Stdout string `json:"stdout"`
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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