Documentation ¶
Index ¶
- type CreateMonitorProxy
- type IMonitorService
- type IMonitorSourceDriver
- type IMonitorSourceManager
- type IMonitorStatisticsCache
- type MonCommonData
- type MonCommonInput
- type MonCommonSort
- type MonCommonStatistics
- type MonInvokeCountTrend
- type MonMessageTrend
- type MonPirMapInfo
- type MonProxyData
- type MonSortBy
- type MonSortType
- type MonStatisticsValue
- type MonTrendFilter
- type MonTrendValues
- type MonWhereItem
- type Monitor
- type SaveMonitor
- type Summary
- type UpdateMonitorProxy
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CreateMonitorProxy ¶
type CreateMonitorProxy struct { }
type IMonitorService ¶
type IMonitorService interface { // Get 获取监控配置 Get(ctx context.Context, id string) (*Monitor, error) // MapByCluster 获取监控配置 MapByCluster(ctx context.Context, clusterIds ...string) (map[string]*Monitor, error) GetByCluster(ctx context.Context, clusterId string) (*Monitor, error) // Save 保存监控配置 Save(ctx context.Context, monitor *SaveMonitor) error }
type IMonitorSourceDriver ¶
IMonitorSourceDriver 监控数据源驱动
type IMonitorSourceManager ¶
type IMonitorSourceManager interface { //driver.IDriverManager[IMonitorSourceDriver] List() []string }
type IMonitorStatisticsCache ¶
type IMonitorStatisticsCache interface { GetStatisticsCache(ctx context.Context, partitionId string, start, end time.Time, groupBy string, wheres []MonWhereItem, limit int) (map[string]MonCommonData, error) SetStatisticsCache(ctx context.Context, partitionId string, start, end time.Time, groupBy string, wheres []MonWhereItem, limit int, values map[string]MonCommonData) error GetTrendCache(ctx context.Context, partitionId string, start, end time.Time, wheres []MonWhereItem) (*MonInvokeCountTrend, error) SetTrendCache(ctx context.Context, partitionId string, start, end time.Time, wheres []MonWhereItem, value *MonInvokeCountTrend) error GetMessageTrend(ctx context.Context, partitionId string, start, end time.Time, wheres []MonWhereItem) (*MonMessageTrend, error) SetMessageTrend(ctx context.Context, partitionId string, start, end time.Time, wheres []MonWhereItem, val *MonMessageTrend) error }
type MonCommonData ¶
type MonCommonData struct { ID string `json:"id"` 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 通用字段
type MonCommonInput ¶
type MonCommonSort ¶
type MonCommonSort struct { Key MonSortType Val bool }
type MonCommonStatistics ¶
type MonCommonStatistics struct { ApiId string //apiID ApiName string //api名称 ServiceID string //上游服务ID ServiceName string //上游服务名称 AppName string //应用名称 AppId string //应用ID Path string //路径 ProxyPath string //转发路径 Ip string //IP Node string //目标节点 IsRed bool //是否标红 MonCommonData }
MonCommonStatistics 调用统计
type MonInvokeCountTrend ¶
type MonInvokeCountTrend struct { Date []time.Time `json:"date"` Status5XX []int64 `json:"status_5_xx"` Status4XX []int64 `json:"status_4_xx"` ProxyRate []float64 `json:"proxy_rate"` ProxyTotal []int64 `json:"proxy_total"` RequestRate []float64 `json:"request_rate"` RequestTotal []int64 `json:"request_total"` }
type MonMessageTrend ¶
type MonPirMapInfo ¶
type MonPirMapInfo struct { RequestTotal int `json:"request_total"` //请求总数 RequestSuccess int `json:"request_success"` //请求成功数 RequestFail int `json:"request_fail"` //请求失败数 RequestStatus5XX int `json:"request_status_5_xx"` RequestStatus4XX int `json:"request_status_4_xx"` ProxyTotal int `json:"proxy_total"` //转发总数 ProxySuccess int `json:"proxy_success"` //转发成功数 ProxyFail int `json:"proxy_fail"` //转发失败数 ProxyStatus5XX int `json:"proxy_status_5_xx"` ProxyStatus4XX int `json:"proxy_status_4_xx"` }
type MonProxyData ¶
type MonProxyData struct { 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"` //最小流量 }
type MonSortType ¶
type MonSortType string
type MonStatisticsValue ¶
type MonStatisticsValue struct {
MonCommonData
}
type MonTrendFilter ¶
type MonTrendFilter struct { Name string MonWhereItem }
type MonTrendValues ¶
type MonWhereItem ¶
type SaveMonitor ¶
type UpdateMonitorProxy ¶
type UpdateMonitorProxy struct { }
Click to show internal directories.
Click to hide internal directories.