mirror of
https://github.com/Buriburizaem0n/nezha_domains.git
synced 2026-09-21 02:30:14 +00:00
feat(agentcompat): expose dashboard capability routes
Co-authored-by: naiba/CloudCode <hi+cloudcode@nai.ba>
This commit is contained in:
@@ -0,0 +1,18 @@
|
||||
//go:build !agentcompat
|
||||
|
||||
package controller
|
||||
|
||||
import (
|
||||
"github.com/gin-gonic/gin"
|
||||
|
||||
"github.com/nezhahq/nezha/service/rpc"
|
||||
)
|
||||
|
||||
func prepareAgentcompatCapabilityHeader(*gin.Context) {}
|
||||
|
||||
func createIOStreamWithAgentcompatCapability(_ *gin.Context, streamID string, creatorUserID, serverID uint64, _ rpc.AgentCompatCapabilityPurpose) (func(), error) {
|
||||
if err := rpc.NezhaHandlerSingleton.CreateStream(streamID, creatorUserID, serverID); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return func() { _ = rpc.NezhaHandlerSingleton.CloseStream(streamID) }, nil
|
||||
}
|
||||
Reference in New Issue
Block a user