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

This commit is contained in:
刘祥超
2022-07-21 14:06:38 +08:00
parent 515a590681
commit 2b650fd285
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,