Documentation ¶
Index ¶
- type MetricsStore
- 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
- type QueryNodeMetricsReq
- type QueryNodeMetricsResp
- type QueryRuleMetricsReq
- type QueryRuleMetricsResp
- type RuleMetricsData
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type MetricsStore ¶
type MetricsStore struct {
// contains filtered or unexported fields
}
func NewMetricsStore ¶
func NewMetricsStore(dbPath string) (*MetricsStore, error)
func (*MetricsStore) AddNodeMetric ¶
func (ms *MetricsStore) AddNodeMetric(ctx context.Context, m *metric_reader.NodeMetrics) error
func (*MetricsStore) AddRuleMetric ¶
func (ms *MetricsStore) AddRuleMetric(ctx context.Context, rm *metric_reader.RuleMetrics) error
func (*MetricsStore) QueryNodeMetric ¶
func (ms *MetricsStore) QueryNodeMetric(ctx context.Context, req *QueryNodeMetricsReq) (*QueryNodeMetricsResp, error)
func (*MetricsStore) QueryRuleMetric ¶
func (ms *MetricsStore) QueryRuleMetric(ctx context.Context, req *QueryRuleMetricsReq) (*QueryRuleMetricsResp, error)
type NodeMetrics ¶
type QueryNodeMetricsReq ¶
type QueryNodeMetricsResp ¶
type QueryNodeMetricsResp struct { TOTAL int `json:"total"` Data []NodeMetrics `json:"data"` }
type QueryRuleMetricsReq ¶
type QueryRuleMetricsResp ¶
type QueryRuleMetricsResp struct { TOTAL int `json:"total"` Data []RuleMetricsData `json:"data"` }
type RuleMetricsData ¶
type RuleMetricsData struct { Timestamp int64 `json:"timestamp"` Label string `json:"label"` Remote string `json:"remote"` PingLatency int64 `json:"ping_latency"` TCPConnectionCount int64 `json:"tcp_connection_count"` TCPHandshakeDuration int64 `json:"tcp_handshake_duration"` TCPNetworkTransmitBytes int64 `json:"tcp_network_transmit_bytes"` UDPConnectionCount int64 `json:"udp_connection_count"` UDPHandshakeDuration int64 `json:"udp_handshake_duration"` UDPNetworkTransmitBytes int64 `json:"udp_network_transmit_bytes"` }
Click to show internal directories.
Click to hide internal directories.