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

This commit is contained in:
GoEdgeLab
2022-04-17 16:18:53 +08:00
parent d418baa893
commit 9f302c86f6
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()