Documentation
¶
Index ¶
- func CleanDayRecords(before time.Time)
- func CleanHoursRecord(before time.Time)
- func CleanMonthRecords(before time.Time)
- func Close() error
- func DoRecord(user string, rx int64, tx int64, t time.Time) error
- func InitDb(ro bool) error
- func SumDay(t time.Time) error
- func SumMonth(t time.Time) error
- func UserCount() int
- type Record
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CleanDayRecords ¶
func CleanHoursRecord ¶
func CleanMonthRecords ¶
func DoRecord ¶
DoRecord should be invoked at the begin of the first minute of an hour in order to account the traffic during last hour.
func SumDay ¶
SumDay should be invoked at the first hour of the day, the time value should be the first hour after the day to sum.
Types ¶
Click to show internal directories.
Click to hide internal directories.