访问日志可以使用分表查询

This commit is contained in:
刘祥超
2022-04-17 16:18:53 +08:00
parent db6b7f57bb
commit 0fe51abeb1
6 changed files with 232 additions and 17 deletions

View File

@@ -56,6 +56,17 @@ func init() {
})
}
func AllAccessLogDBs() []*dbs.DB {
accessLogLocker.Lock()
defer accessLogLocker.Unlock()
var result = []*dbs.DB{}
for _, db := range accessLogDBMapping {
result = append(result, db)
}
return result
}
// 获取获取DAO
func randomHTTPAccessLogDAO() (dao *HTTPAccessLogDAOWrapper) {
accessLogLocker.RLock()