Versions in this module Expand all Collapse all v1 v1.1.6-next Sep 11, 2024 v1.1.5 Sep 9, 2024 Changes in this version + type MetricsStore struct + func NewMetricsStore(dbPath string) (*MetricsStore, error) + func (ms *MetricsStore) AddNodeMetric(ctx context.Context, m *metric_reader.NodeMetrics) error + func (ms *MetricsStore) AddRuleMetric(ctx context.Context, rm *metric_reader.RuleMetrics) error + func (ms *MetricsStore) QueryNodeMetric(ctx context.Context, req *QueryNodeMetricsReq) (*QueryNodeMetricsResp, error) + func (ms *MetricsStore) QueryRuleMetric(ctx context.Context, req *QueryRuleMetricsReq) (*QueryRuleMetricsResp, error) + type NodeMetrics struct + CPUUsage float64 + DiskUsage float64 + MemoryUsage float64 + NetworkIn float64 + NetworkOut float64 + Timestamp int64 + type QueryNodeMetricsReq struct + EndTimestamp int64 + Num int64 + StartTimestamp int64 + type QueryNodeMetricsResp struct + Data []NodeMetrics + TOTAL int + type QueryRuleMetricsReq struct + EndTimestamp int64 + Num int64 + Remote string + RuleLabel string + StartTimestamp int64 + type QueryRuleMetricsResp struct + Data []RuleMetricsData + TOTAL int + type RuleMetricsData struct + Label string + PingLatency int64 + Remote string + TCPConnectionCount int64 + TCPHandshakeDuration int64 + TCPNetworkTransmitBytes int64 + Timestamp int64 + UDPConnectionCount int64 + UDPHandshakeDuration int64 + UDPNetworkTransmitBytes int64