API RPC配置增加disableUpdate,可以停用自动更新API节点

This commit is contained in:
GoEdgeLab
2022-07-21 14:06:38 +08:00
parent eb732a022a
commit 51c1d2fa7c
5 changed files with 32 additions and 18 deletions

View File

@@ -635,11 +635,13 @@ func (this *Node) checkClusterConfig() error {
if len(resp.Endpoints) == 0 {
resp.Endpoints = []string{}
}
apiConfig := &configs.APIConfig{
var apiConfig = &configs.APIConfig{
RPC: struct {
Endpoints []string `yaml:"endpoints"`
Endpoints []string `yaml:"endpoints"`
DisableUpdate bool `yaml:"disableUpdate"`
}{
Endpoints: resp.Endpoints,
Endpoints: resp.Endpoints,
DisableUpdate: false,
},
NodeId: resp.UniqueId,
Secret: resp.Secret,