Documentation ¶
Index ¶
- Constants
- func AddKeyDetail(time time.Time, keyNs int64, keyCode uint16)
- func CloseConnection()
- func CloseRedisConnectionThenExit()
- func ExportDetailToCsv(day time.Time)
- func GetConnection() *redis.Client
- func GetDb() *leveldb.DB
- func GetDetailKey(time time.Time) string
- func GetDetailKeyByString(timeStr string) string
- func GetRankKey(time time.Time) string
- func GetRankKeyByString(timeStr string) string
- func GetTodayMaxKPMKey(time time.Time) string
- func GetTodayMaxKPMKeyByString(timeStr string) string
- func GetTodayTempKPMKey(time time.Time) string
- func GetTodayTempKPMKeyByString(timeStr string) string
- func IncrRankKey(time time.Time, keyCode uint16)
- func IncrTotalCount(time time.Time)
- func InitConnection(option redis.Options, coreApp bool)
- func InitDb()
- func MaxKPMVal(time time.Time) string
- func TempKPMVal(time time.Time) string
- func TotalCountVal(time time.Time) int
- type DetailVO
Constants ¶
View Source
const ( Prefix = "keyboard:" DateFormat = "2006:01:02" TimeFormat = ctk.HH_MM_SS MsTimeFormat = ctk.HH_MM_SS_MS )
View Source
const ( LastInputEvent = Prefix + "last-event" // last use event. STRING TotalCount = Prefix + "total" // total count. ZSET KeyMap = Prefix + "key-map" // all key code map. HASH CoreLive = Prefix + "core-live" // core process live heart beat )
Variables ¶
This section is empty.
Functions ¶
func CloseConnection ¶
func CloseConnection()
func CloseRedisConnectionThenExit ¶
func CloseRedisConnectionThenExit()
func ExportDetailToCsv ¶
func GetConnection ¶
func GetDetailKey ¶
GetDetailKey by time zset member 时间戳 score keyCode
func GetDetailKeyByString ¶
func GetRankKey ¶
GetRankKey by time zset member keyCode score 按键数
func GetTodayTempKPMKey ¶
func IncrRankKey ¶
func IncrTotalCount ¶
func InitConnection ¶
func TempKPMVal ¶
func TotalCountVal ¶
Types ¶
Click to show internal directories.
Click to hide internal directories.