2021-01-21 20:22:58 +08:00
|
|
|
package stats
|
2021-01-21 18:55:34 +08:00
|
|
|
|
2021-07-05 11:37:22 +08:00
|
|
|
// TrafficHourlyStat 总的流量统计(按小时)
|
2021-01-21 18:55:34 +08:00
|
|
|
type TrafficHourlyStat struct {
|
2021-07-05 11:37:22 +08:00
|
|
|
Id uint64 `field:"id"` // ID
|
|
|
|
|
Hour string `field:"hour"` // YYYYMMDDHH
|
|
|
|
|
Bytes uint64 `field:"bytes"` // 流量字节
|
|
|
|
|
CachedBytes uint64 `field:"cachedBytes"` // 缓存流量
|
|
|
|
|
CountRequests uint64 `field:"countRequests"` // 请求数
|
|
|
|
|
CountCachedRequests uint64 `field:"countCachedRequests"` // 缓存请求数
|
2021-07-13 11:04:45 +08:00
|
|
|
CountAttackRequests uint64 `field:"countAttackRequests"` // 攻击数
|
|
|
|
|
AttackBytes uint64 `field:"attackBytes"` // 攻击流量
|
2021-01-21 18:55:34 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
type TrafficHourlyStatOperator struct {
|
2021-07-05 11:37:22 +08:00
|
|
|
Id interface{} // ID
|
|
|
|
|
Hour interface{} // YYYYMMDDHH
|
|
|
|
|
Bytes interface{} // 流量字节
|
|
|
|
|
CachedBytes interface{} // 缓存流量
|
|
|
|
|
CountRequests interface{} // 请求数
|
|
|
|
|
CountCachedRequests interface{} // 缓存请求数
|
2021-07-13 11:04:45 +08:00
|
|
|
CountAttackRequests interface{} // 攻击数
|
|
|
|
|
AttackBytes interface{} // 攻击流量
|
2021-01-21 18:55:34 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func NewTrafficHourlyStatOperator() *TrafficHourlyStatOperator {
|
|
|
|
|
return &TrafficHourlyStatOperator{}
|
|
|
|
|
}
|