feat: add online user count

This commit is contained in:
naiba
2024-12-21 10:59:05 +08:00
parent 3227e30b3e
commit f212144310
4 changed files with 32 additions and 0 deletions

View File

@@ -3,6 +3,7 @@ package singleton
import (
_ "embed"
"log"
"sync/atomic"
"time"
"github.com/patrickmn/go-cache"
@@ -23,6 +24,7 @@ var (
Loc *time.Location
FrontendTemplates []model.FrontendTemplate
DashboardBootTime = uint64(time.Now().Unix())
OnlineUsers = new(atomic.Uint64)
)
//go:embed frontend-templates.yaml