monitor_dto

package
v1.3.4-beta Latest Latest
Warning

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

Go to latest
Published: Dec 18, 2024 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DataTypeApi        = "api"
	DataTypeProvider   = "provider"
	DataTypeSubscriber = "subscriber"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type ApiStatisticBasicItem

type ApiStatisticBasicItem struct {
	Id      string     `json:"id"`   //apiID
	Name    string     `json:"name"` //api名称
	Path    string     `json:"path"`
	Service auto.Label `json:"service" aolabel:"service"`
	*MonCommonData
}

type ApiStatisticItem

type ApiStatisticItem struct {
	*ApiStatisticBasicItem
	IsRed bool `json:"is_red"` //是否标红
}

type CommonInput

type CommonInput struct {
	Start int64 `json:"start"`
	End   int64 `json:"end"`
}

type MonCommonData

type MonCommonData struct {
	RequestTotal   int64   `json:"request_total"`   //请求总数
	RequestSuccess int64   `json:"request_success"` //请求成功数
	RequestRate    float64 `json:"request_rate"`    //请求成功率
	ProxyTotal     int64   `json:"proxy_total"`     //转发总数
	ProxySuccess   int64   `json:"proxy_success"`   //转发成功数
	ProxyRate      float64 `json:"proxy_rate"`      //转发成功率
	StatusFail     int64   `json:"status_fail"`     //失败状态数
	AvgResp        float64 `json:"avg_resp"`        //平均响应时间
	MaxResp        int64   `json:"max_resp"`        //最大响应时间
	MinResp        int64   `json:"min_resp"`        //最小响应时间
	AvgTraffic     float64 `json:"avg_traffic"`     //平均流量
	MaxTraffic     int64   `json:"max_traffic"`     //最大流量
	MinTraffic     int64   `json:"min_traffic"`     //最小流量
}

MonCommonData 通用字段

func ToMonCommonData

func ToMonCommonData(item monitor.MonCommonData) *MonCommonData

type MonInvokeCountTrend

type MonInvokeCountTrend struct {
	Date         []time.Time `json:"date"`
	Status5XX    []int64     `json:"status_5xx"`
	Status4XX    []int64     `json:"status_4xx"`
	ProxyRate    []float64   `json:"proxy_rate"`
	ProxyTotal   []int64     `json:"proxy_total"`
	RequestRate  []float64   `json:"request_rate"`
	RequestTotal []int64     `json:"request_total"`
}

func ToMonInvokeCountTrend

func ToMonInvokeCountTrend(item *monitor.MonInvokeCountTrend) *MonInvokeCountTrend

type MonMessageChart

type MonMessageChart struct {
	Date     []time.Time `json:"date"`
	Request  []float64   `json:"request"`
	Response []float64   `json:"response"`
}

type MonMessageTrend

type MonMessageTrend struct {
	Dates       []time.Time `json:"dates"`
	ReqMessage  []float64   `json:"req_message"`
	RespMessage []float64   `json:"resp_message"`
}

func ToMonMessageTrend

func ToMonMessageTrend(item *monitor.MonMessageTrend) *MonMessageTrend

type MonSummaryOutput

type MonSummaryOutput struct {
	Total     int64 `json:"total"`      // 请求总数
	Success   int64 `json:"success"`    //请求成功数
	Fail      int64 `json:"fail"`       //请求失败数
	Status4Xx int64 `json:"status_4xx"` //状态码4xx数
	Status5Xx int64 `json:"status_5xx"` //状态码5xx数
}

MonSummaryOutput 请求/转发统计

func ToMonSummaryOutput

func ToMonSummaryOutput(output *monitor.Summary) *MonSummaryOutput

type MonWhereItem

type MonWhereItem struct {
	Key       string
	Operation string // 表达式,默认为 =,多个为 in,可以用其他
	Values    []string
}

type MonitorCluster

type MonitorCluster struct {
	Id     string `json:"id"`
	Name   string `json:"name"`
	Enable bool   `json:"enable"`
}

type MonitorConfig

type MonitorConfig struct {
	Driver string                 `json:"driver"`
	Config map[string]interface{} `json:"config"`
}

type SaveMonitorConfig

type SaveMonitorConfig struct {
	Driver string                 `json:"driver"`
	Config map[string]interface{} `json:"config"`
}

type ServiceStatisticBasicItem

type ServiceStatisticBasicItem struct {
	Id   string `json:"id"`   //订阅方ID
	Name string `json:"name"` //订阅方名称
	*MonCommonData
}

type ServiceStatisticItem

type ServiceStatisticItem struct {
	*ServiceStatisticBasicItem
	IsRed bool `json:"is_red"` //是否标红
}

type StatisticInput

type StatisticInput struct {
	Apis     []string `json:"apis"`
	Services []string `json:"services"`
	Path     string   `json:"path"`
	*CommonInput
}

type Top10Input

type Top10Input struct {
	*CommonInput
	DataType string `json:"data_type"`
}

Jump to

Keyboard shortcuts

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