first commit
This commit is contained in:
@@ -0,0 +1,19 @@
|
||||
package server
|
||||
|
||||
import (
|
||||
"regexp"
|
||||
|
||||
"agent/internal/agent"
|
||||
)
|
||||
|
||||
// Server 持有全部依赖,各 handler 文件通过它访问共享状态。
|
||||
type Server struct {
|
||||
cfg agent.Config
|
||||
store *agent.SessionStore
|
||||
agent *agent.Agent
|
||||
dockerCfg *agent.DockerConfigStore
|
||||
apiCfg *agent.APIConfigStore
|
||||
}
|
||||
|
||||
// sessionIDPattern 匹配会话直达路径 / WebSocket 绑定的会话 ID 格式(24 位十六进制)。
|
||||
var sessionIDPattern = regexp.MustCompile(`^[0-9a-f]{24}$`)
|
||||
Reference in New Issue
Block a user