实现监控节点在线状态

This commit is contained in:
GoEdgeLab
2020-10-25 18:27:07 +08:00
parent 379ec0790e
commit 9524a0d145
6 changed files with 117 additions and 0 deletions

View File

@@ -2,6 +2,7 @@ package servers
import (
"encoding/json"
teaconst "github.com/TeaOSLab/EdgeAdmin/internal/const"
"github.com/TeaOSLab/EdgeAdmin/internal/web/actions/actionutils"
"github.com/TeaOSLab/EdgeCommon/pkg/rpc/pb"
"github.com/TeaOSLab/EdgeCommon/pkg/serverconfigs"
@@ -109,6 +110,11 @@ func (this *CreateAction) RunPost(params struct {
}
}
case serverconfigs.ServerTypeTCPProxy:
// 在DEMO模式下不能创建
if teaconst.IsDemo {
this.Fail("DEMO模式下不能创建TCP反向代理")
}
listen := []*serverconfigs.NetworkAddressConfig{}
err := json.Unmarshal([]byte(params.Addresses), &listen)
if err != nil {