feat: import Sea vHost single-server testing release

This commit is contained in:
canglan committed 2026-10-30 08:39:10 +08:00
commit 248badd33e
441 files changed
+63221

No files matched your search

@@ -0,0 +1,22 @@
package panel
import (
"encoding/json"
"errors"
"net/http"
)
// Stateless mode retains only local panel credentials, never a platform
// resource registry. The network gateway cannot reconfigure credentials.
func(s *BrokerServer) EnableStateless()error{
if s.direct==nil{return errors.New("local panel credentials must be configured before enabling the node broker")}
s.stateless=true;s.registry=brokerRegistry{};return nil
}
func(s *BrokerServer) scopedOperations(w http.ResponseWriter,r *http.Request){
var input ScopedExecution
if !brokerDecode(w,r,&input){return}
s.mu.Lock();defer s.mu.Unlock()
result,err:=ExecuteScoped(r.Context(),s.direct,s.tenantRoot,input)
if err!=nil{brokerWriteError(w,http.StatusUnprocessableEntity,safeBrokerError("节点面板操作失败",err));return}
w.Header().Set("Content-Type","application/json");_ = json.NewEncoder(w).Encode(result)
}