mirror of
https://github.com/Buriburizaem0n/nezha_domains.git
synced 2026-09-19 17:50:12 +00:00
19 lines
546 B
Go
19 lines
546 B
Go
//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
|
|
}
|