记录节点/集群的流量统计以备将来使用

This commit is contained in:
刘祥超
2021-01-21 20:22:58 +08:00
parent 22667b7d0a
commit 1d4f01a062
20 changed files with 189 additions and 17 deletions

View File

@@ -0,0 +1,18 @@
package stats
// 总的流量统计(按小时)
type TrafficHourlyStat struct {
Id uint64 `field:"id"` // ID
Hour string `field:"hour"` // YYYYMMDDHH
Bytes uint64 `field:"bytes"` // 流量字节
}
type TrafficHourlyStatOperator struct {
Id interface{} // ID
Hour interface{} // YYYYMMDDHH
Bytes interface{} // 流量字节
}
func NewTrafficHourlyStatOperator() *TrafficHourlyStatOperator {
return &TrafficHourlyStatOperator{}
}