basically added session manager, minimal. stores uuid and ttl sessions to eliminate recursive queries

This commit is contained in:
2025-07-31 23:29:30 +03:00
parent b6ad0f82a0
commit 3b8390a0c8
10 changed files with 93 additions and 12 deletions

View File

@@ -7,7 +7,7 @@ import (
"github.com/akyaiy/GoSally-mvp/internal/server/rpc"
)
func (h *HandlerV1) Handle(r *http.Request, req *rpc.RPCRequest) *rpc.RPCResponse {
func (h *HandlerV1) Handle(sid string, r *http.Request, req *rpc.RPCRequest) *rpc.RPCResponse {
if req.Method == "" {
h.x.SLog.Info("invalid request received", slog.String("issue", rpc.ErrMethodNotFoundS), slog.String("requested-method", req.Method))
return rpc.NewError(rpc.ErrMethodIsMissing, rpc.ErrMethodIsMissingS, req.ID)
@@ -24,5 +24,5 @@ func (h *HandlerV1) Handle(r *http.Request, req *rpc.RPCRequest) *rpc.RPCRespons
}
}
return h.handleLUA(r, req, method)
return h.handleLUA(sid, r, req, method)
}