基本逻辑完成

This commit is contained in:
2024-11-01 17:40:34 +08:00
commit f9b9beea4b
40 changed files with 1869 additions and 0 deletions

View File

@@ -0,0 +1,16 @@
package middleware
import (
"game-driver/internal/common"
"game-driver/leaf"
)
// DeviceLock 设备锁中间件
func DeviceLock(d *common.Device) leaf.HandlerFunc {
return func(c *leaf.Context) {
d.Lock()
defer d.Unlock()
c.Next()
}
}