From 30a1b4fa5e7377be82efb4fc3d7113cc01735ae3 Mon Sep 17 00:00:00 2001 From: robin Date: Wed, 4 Mar 2026 19:14:57 +0800 Subject: [PATCH] =?UTF-8?q?=E6=96=87=E4=BB=B6=E6=81=A2=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitignore | Bin 344 -> 303 bytes .../rpc/pb/service_httpdns_node_upgrade.go | 345 ++++++++++++++++++ .../pkg/rpc/pb/service_ns_node_upgrade.go | 274 ++++++++++++++ .../pkg/systemconfigs/upgrade_config.go | 12 + 4 files changed, 631 insertions(+) create mode 100644 EdgeCommon/pkg/rpc/pb/service_httpdns_node_upgrade.go create mode 100644 EdgeCommon/pkg/rpc/pb/service_ns_node_upgrade.go create mode 100644 EdgeCommon/pkg/systemconfigs/upgrade_config.go diff --git a/.gitignore b/.gitignore index ec8c8571f335004067fb27d2dc411061b3a16745..fa84c93da362a98c02d5a5f3004ff98772dd10e8 100644 GIT binary patch delta 162 zcmWlPO9}!p5JYj%P4EP|3Ahjjl0Ji=J6+8Iq)mEau;;@}2S2A!Jc!rvI7TR{Ucvho zpW+Ei<*CNRVo96_RhD44)v=Oppx0rMGd1J6$s5cSIomyVcc?j0E9Mjh#;jr>P|#mO zZtED6&tI+dzH`W$aR{VODYDl%NUYJxsCGWk#y7DA%4G15mTvT(Pu8>2K4Sj^BZoE7 delta 155 zcmZ3_bc1Pvz8o)CN@`kSX-ZMks p@=j)ER97|BGtslutI8~ZYt+|cNM^`kNMtBwNMT52;AP-q005-SDq{cu diff --git a/EdgeCommon/pkg/rpc/pb/service_httpdns_node_upgrade.go b/EdgeCommon/pkg/rpc/pb/service_httpdns_node_upgrade.go new file mode 100644 index 0000000..2736957 --- /dev/null +++ b/EdgeCommon/pkg/rpc/pb/service_httpdns_node_upgrade.go @@ -0,0 +1,345 @@ +package pb + +import ( + "fmt" + + "google.golang.org/protobuf/encoding/protowire" + "google.golang.org/protobuf/proto" +) + +// CountAllUpgradeHTTPDNSNodesWithClusterIdRequest 计算需要升级的HTTPDNS节点数量 +type CountAllUpgradeHTTPDNSNodesWithClusterIdRequest struct { + ClusterId int64 `protobuf:"varint,1,opt,name=clusterId,proto3" json:"clusterId,omitempty"` +} + +func (x *CountAllUpgradeHTTPDNSNodesWithClusterIdRequest) Reset() { *x = CountAllUpgradeHTTPDNSNodesWithClusterIdRequest{} } +func (x *CountAllUpgradeHTTPDNSNodesWithClusterIdRequest) String() string { return fmt.Sprintf("%+v", *x) } +func (x *CountAllUpgradeHTTPDNSNodesWithClusterIdRequest) ProtoMessage() {} + +func (x *CountAllUpgradeHTTPDNSNodesWithClusterIdRequest) GetClusterId() int64 { + if x != nil { + return x.ClusterId + } + return 0 +} + +func (x *CountAllUpgradeHTTPDNSNodesWithClusterIdRequest) Marshal() ([]byte, error) { + var b []byte + if x.ClusterId != 0 { + b = protowire.AppendTag(b, 1, protowire.VarintType) + b = protowire.AppendVarint(b, uint64(x.ClusterId)) + } + return b, nil +} + +func (x *CountAllUpgradeHTTPDNSNodesWithClusterIdRequest) Unmarshal(data []byte) error { + for len(data) > 0 { + num, typ, n := protowire.ConsumeTag(data) + if n < 0 { + return fmt.Errorf("invalid tag") + } + data = data[n:] + switch num { + case 1: + if typ == protowire.VarintType { + v, n := protowire.ConsumeVarint(data) + if n < 0 { + return fmt.Errorf("invalid varint") + } + x.ClusterId = int64(v) + data = data[n:] + } + default: + n := protowire.ConsumeFieldValue(num, typ, data) + if n < 0 { + return fmt.Errorf("invalid field value") + } + data = data[n:] + } + } + return nil +} + +// FindAllUpgradeHTTPDNSNodesWithClusterIdRequest 列出所有需要升级的HTTPDNS节点 +type FindAllUpgradeHTTPDNSNodesWithClusterIdRequest struct { + ClusterId int64 `protobuf:"varint,1,opt,name=clusterId,proto3" json:"clusterId,omitempty"` +} + +func (x *FindAllUpgradeHTTPDNSNodesWithClusterIdRequest) Reset() { *x = FindAllUpgradeHTTPDNSNodesWithClusterIdRequest{} } +func (x *FindAllUpgradeHTTPDNSNodesWithClusterIdRequest) String() string { return fmt.Sprintf("%+v", *x) } +func (x *FindAllUpgradeHTTPDNSNodesWithClusterIdRequest) ProtoMessage() {} + +func (x *FindAllUpgradeHTTPDNSNodesWithClusterIdRequest) GetClusterId() int64 { + if x != nil { + return x.ClusterId + } + return 0 +} + +func (x *FindAllUpgradeHTTPDNSNodesWithClusterIdRequest) Marshal() ([]byte, error) { + var b []byte + if x.ClusterId != 0 { + b = protowire.AppendTag(b, 1, protowire.VarintType) + b = protowire.AppendVarint(b, uint64(x.ClusterId)) + } + return b, nil +} + +func (x *FindAllUpgradeHTTPDNSNodesWithClusterIdRequest) Unmarshal(data []byte) error { + for len(data) > 0 { + num, typ, n := protowire.ConsumeTag(data) + if n < 0 { + return fmt.Errorf("invalid tag") + } + data = data[n:] + switch num { + case 1: + if typ == protowire.VarintType { + v, n := protowire.ConsumeVarint(data) + if n < 0 { + return fmt.Errorf("invalid varint") + } + x.ClusterId = int64(v) + data = data[n:] + } + default: + n := protowire.ConsumeFieldValue(num, typ, data) + if n < 0 { + return fmt.Errorf("invalid field value") + } + data = data[n:] + } + } + return nil +} + +// FindAllUpgradeHTTPDNSNodesWithClusterIdResponse_HTTPDNSNodeUpgrade 单个待升级节点信息 +type FindAllUpgradeHTTPDNSNodesWithClusterIdResponse_HTTPDNSNodeUpgrade struct { + Node *HTTPDNSNode `protobuf:"bytes,1,opt,name=node,proto3" json:"node,omitempty"` + Os string `protobuf:"bytes,2,opt,name=os,proto3" json:"os,omitempty"` + Arch string `protobuf:"bytes,3,opt,name=arch,proto3" json:"arch,omitempty"` + OldVersion string `protobuf:"bytes,4,opt,name=oldVersion,proto3" json:"oldVersion,omitempty"` + NewVersion string `protobuf:"bytes,5,opt,name=newVersion,proto3" json:"newVersion,omitempty"` +} + +func (x *FindAllUpgradeHTTPDNSNodesWithClusterIdResponse_HTTPDNSNodeUpgrade) Reset() { + *x = FindAllUpgradeHTTPDNSNodesWithClusterIdResponse_HTTPDNSNodeUpgrade{} +} +func (x *FindAllUpgradeHTTPDNSNodesWithClusterIdResponse_HTTPDNSNodeUpgrade) String() string { + return fmt.Sprintf("%+v", *x) +} +func (x *FindAllUpgradeHTTPDNSNodesWithClusterIdResponse_HTTPDNSNodeUpgrade) ProtoMessage() {} + +func (x *FindAllUpgradeHTTPDNSNodesWithClusterIdResponse_HTTPDNSNodeUpgrade) Marshal() ([]byte, error) { + var b []byte + if x.Node != nil { + nodeData, err := proto.Marshal(x.Node) + if err != nil { + return nil, err + } + b = protowire.AppendTag(b, 1, protowire.BytesType) + b = protowire.AppendBytes(b, nodeData) + } + if x.Os != "" { + b = protowire.AppendTag(b, 2, protowire.BytesType) + b = protowire.AppendString(b, x.Os) + } + if x.Arch != "" { + b = protowire.AppendTag(b, 3, protowire.BytesType) + b = protowire.AppendString(b, x.Arch) + } + if x.OldVersion != "" { + b = protowire.AppendTag(b, 4, protowire.BytesType) + b = protowire.AppendString(b, x.OldVersion) + } + if x.NewVersion != "" { + b = protowire.AppendTag(b, 5, protowire.BytesType) + b = protowire.AppendString(b, x.NewVersion) + } + return b, nil +} + +func (x *FindAllUpgradeHTTPDNSNodesWithClusterIdResponse_HTTPDNSNodeUpgrade) Unmarshal(data []byte) error { + for len(data) > 0 { + num, typ, n := protowire.ConsumeTag(data) + if n < 0 { + return fmt.Errorf("invalid tag") + } + data = data[n:] + switch num { + case 1: + if typ == protowire.BytesType { + v, n := protowire.ConsumeBytes(data) + if n < 0 { + return fmt.Errorf("invalid bytes") + } + x.Node = &HTTPDNSNode{} + if err := proto.Unmarshal(v, x.Node); err != nil { + return err + } + data = data[n:] + } + case 2: + if typ == protowire.BytesType { + v, n := protowire.ConsumeString(data) + if n < 0 { + return fmt.Errorf("invalid string") + } + x.Os = v + data = data[n:] + } + case 3: + if typ == protowire.BytesType { + v, n := protowire.ConsumeString(data) + if n < 0 { + return fmt.Errorf("invalid string") + } + x.Arch = v + data = data[n:] + } + case 4: + if typ == protowire.BytesType { + v, n := protowire.ConsumeString(data) + if n < 0 { + return fmt.Errorf("invalid string") + } + x.OldVersion = v + data = data[n:] + } + case 5: + if typ == protowire.BytesType { + v, n := protowire.ConsumeString(data) + if n < 0 { + return fmt.Errorf("invalid string") + } + x.NewVersion = v + data = data[n:] + } + default: + n := protowire.ConsumeFieldValue(num, typ, data) + if n < 0 { + return fmt.Errorf("invalid field value") + } + data = data[n:] + } + } + return nil +} + +// FindAllUpgradeHTTPDNSNodesWithClusterIdResponse 列出所有需要升级的HTTPDNS节点 +type FindAllUpgradeHTTPDNSNodesWithClusterIdResponse struct { + Nodes []*FindAllUpgradeHTTPDNSNodesWithClusterIdResponse_HTTPDNSNodeUpgrade `protobuf:"bytes,1,rep,name=nodes,proto3" json:"nodes,omitempty"` +} + +func (x *FindAllUpgradeHTTPDNSNodesWithClusterIdResponse) Reset() { + *x = FindAllUpgradeHTTPDNSNodesWithClusterIdResponse{} +} +func (x *FindAllUpgradeHTTPDNSNodesWithClusterIdResponse) String() string { + return fmt.Sprintf("%+v", *x) +} +func (x *FindAllUpgradeHTTPDNSNodesWithClusterIdResponse) ProtoMessage() {} + +func (x *FindAllUpgradeHTTPDNSNodesWithClusterIdResponse) GetNodes() []*FindAllUpgradeHTTPDNSNodesWithClusterIdResponse_HTTPDNSNodeUpgrade { + if x != nil { + return x.Nodes + } + return nil +} + +func (x *FindAllUpgradeHTTPDNSNodesWithClusterIdResponse) Marshal() ([]byte, error) { + var b []byte + for _, node := range x.Nodes { + nodeData, err := node.Marshal() + if err != nil { + return nil, err + } + b = protowire.AppendTag(b, 1, protowire.BytesType) + b = protowire.AppendBytes(b, nodeData) + } + return b, nil +} + +func (x *FindAllUpgradeHTTPDNSNodesWithClusterIdResponse) Unmarshal(data []byte) error { + for len(data) > 0 { + num, typ, n := protowire.ConsumeTag(data) + if n < 0 { + return fmt.Errorf("invalid tag") + } + data = data[n:] + switch num { + case 1: + if typ == protowire.BytesType { + v, n := protowire.ConsumeBytes(data) + if n < 0 { + return fmt.Errorf("invalid bytes") + } + node := &FindAllUpgradeHTTPDNSNodesWithClusterIdResponse_HTTPDNSNodeUpgrade{} + if err := node.Unmarshal(v); err != nil { + return err + } + x.Nodes = append(x.Nodes, node) + data = data[n:] + } + default: + n := protowire.ConsumeFieldValue(num, typ, data) + if n < 0 { + return fmt.Errorf("invalid field value") + } + data = data[n:] + } + } + return nil +} + +// UpgradeHTTPDNSNodeRequest 升级单个HTTPDNS节点 +type UpgradeHTTPDNSNodeRequest struct { + NodeId int64 `protobuf:"varint,1,opt,name=nodeId,proto3" json:"nodeId,omitempty"` +} + +func (x *UpgradeHTTPDNSNodeRequest) Reset() { *x = UpgradeHTTPDNSNodeRequest{} } +func (x *UpgradeHTTPDNSNodeRequest) String() string { return fmt.Sprintf("%+v", *x) } +func (x *UpgradeHTTPDNSNodeRequest) ProtoMessage() {} + +func (x *UpgradeHTTPDNSNodeRequest) GetNodeId() int64 { + if x != nil { + return x.NodeId + } + return 0 +} + +func (x *UpgradeHTTPDNSNodeRequest) Marshal() ([]byte, error) { + var b []byte + if x.NodeId != 0 { + b = protowire.AppendTag(b, 1, protowire.VarintType) + b = protowire.AppendVarint(b, uint64(x.NodeId)) + } + return b, nil +} + +func (x *UpgradeHTTPDNSNodeRequest) Unmarshal(data []byte) error { + for len(data) > 0 { + num, typ, n := protowire.ConsumeTag(data) + if n < 0 { + return fmt.Errorf("invalid tag") + } + data = data[n:] + switch num { + case 1: + if typ == protowire.VarintType { + v, n := protowire.ConsumeVarint(data) + if n < 0 { + return fmt.Errorf("invalid varint") + } + x.NodeId = int64(v) + data = data[n:] + } + default: + n := protowire.ConsumeFieldValue(num, typ, data) + if n < 0 { + return fmt.Errorf("invalid field value") + } + data = data[n:] + } + } + return nil +} diff --git a/EdgeCommon/pkg/rpc/pb/service_ns_node_upgrade.go b/EdgeCommon/pkg/rpc/pb/service_ns_node_upgrade.go new file mode 100644 index 0000000..baf3f88 --- /dev/null +++ b/EdgeCommon/pkg/rpc/pb/service_ns_node_upgrade.go @@ -0,0 +1,274 @@ +package pb + +import ( + "fmt" + + "google.golang.org/protobuf/encoding/protowire" + "google.golang.org/protobuf/proto" +) + +// FindAllUpgradeNSNodesWithNSClusterIdRequest 列出所有需要升级的NS节点 +type FindAllUpgradeNSNodesWithNSClusterIdRequest struct { + NsClusterId int64 `protobuf:"varint,1,opt,name=nsClusterId,proto3" json:"nsClusterId,omitempty"` +} + +func (x *FindAllUpgradeNSNodesWithNSClusterIdRequest) Reset() { *x = FindAllUpgradeNSNodesWithNSClusterIdRequest{} } +func (x *FindAllUpgradeNSNodesWithNSClusterIdRequest) String() string { return fmt.Sprintf("%+v", *x) } +func (x *FindAllUpgradeNSNodesWithNSClusterIdRequest) ProtoMessage() {} + +func (x *FindAllUpgradeNSNodesWithNSClusterIdRequest) GetNsClusterId() int64 { + if x != nil { + return x.NsClusterId + } + return 0 +} + +func (x *FindAllUpgradeNSNodesWithNSClusterIdRequest) Marshal() ([]byte, error) { + var b []byte + if x.NsClusterId != 0 { + b = protowire.AppendTag(b, 1, protowire.VarintType) + b = protowire.AppendVarint(b, uint64(x.NsClusterId)) + } + return b, nil +} + +func (x *FindAllUpgradeNSNodesWithNSClusterIdRequest) Unmarshal(data []byte) error { + for len(data) > 0 { + num, typ, n := protowire.ConsumeTag(data) + if n < 0 { + return fmt.Errorf("invalid tag") + } + data = data[n:] + switch num { + case 1: + if typ == protowire.VarintType { + v, n := protowire.ConsumeVarint(data) + if n < 0 { + return fmt.Errorf("invalid varint") + } + x.NsClusterId = int64(v) + data = data[n:] + } + default: + n := protowire.ConsumeFieldValue(num, typ, data) + if n < 0 { + return fmt.Errorf("invalid field value") + } + data = data[n:] + } + } + return nil +} + +// FindAllUpgradeNSNodesWithNSClusterIdResponse_NSNodeUpgrade 单个待升级NS节点信息 +type FindAllUpgradeNSNodesWithNSClusterIdResponse_NSNodeUpgrade struct { + NsNode *NSNode `protobuf:"bytes,1,opt,name=nsNode,proto3" json:"nsNode,omitempty"` + Os string `protobuf:"bytes,2,opt,name=os,proto3" json:"os,omitempty"` + Arch string `protobuf:"bytes,3,opt,name=arch,proto3" json:"arch,omitempty"` + OldVersion string `protobuf:"bytes,4,opt,name=oldVersion,proto3" json:"oldVersion,omitempty"` + NewVersion string `protobuf:"bytes,5,opt,name=newVersion,proto3" json:"newVersion,omitempty"` +} + +func (x *FindAllUpgradeNSNodesWithNSClusterIdResponse_NSNodeUpgrade) Reset() { + *x = FindAllUpgradeNSNodesWithNSClusterIdResponse_NSNodeUpgrade{} +} +func (x *FindAllUpgradeNSNodesWithNSClusterIdResponse_NSNodeUpgrade) String() string { + return fmt.Sprintf("%+v", *x) +} +func (x *FindAllUpgradeNSNodesWithNSClusterIdResponse_NSNodeUpgrade) ProtoMessage() {} + +func (x *FindAllUpgradeNSNodesWithNSClusterIdResponse_NSNodeUpgrade) Marshal() ([]byte, error) { + var b []byte + if x.NsNode != nil { + nodeData, err := proto.Marshal(x.NsNode) + if err != nil { + return nil, err + } + b = protowire.AppendTag(b, 1, protowire.BytesType) + b = protowire.AppendBytes(b, nodeData) + } + if x.Os != "" { + b = protowire.AppendTag(b, 2, protowire.BytesType) + b = protowire.AppendString(b, x.Os) + } + if x.Arch != "" { + b = protowire.AppendTag(b, 3, protowire.BytesType) + b = protowire.AppendString(b, x.Arch) + } + if x.OldVersion != "" { + b = protowire.AppendTag(b, 4, protowire.BytesType) + b = protowire.AppendString(b, x.OldVersion) + } + if x.NewVersion != "" { + b = protowire.AppendTag(b, 5, protowire.BytesType) + b = protowire.AppendString(b, x.NewVersion) + } + return b, nil +} + +func (x *FindAllUpgradeNSNodesWithNSClusterIdResponse_NSNodeUpgrade) Unmarshal(data []byte) error { + for len(data) > 0 { + num, typ, n := protowire.ConsumeTag(data) + if n < 0 { + return fmt.Errorf("invalid tag") + } + data = data[n:] + switch num { + case 1: + if typ == protowire.BytesType { + v, n := protowire.ConsumeBytes(data) + if n < 0 { + return fmt.Errorf("invalid bytes") + } + x.NsNode = &NSNode{} + if err := proto.Unmarshal(v, x.NsNode); err != nil { + return err + } + data = data[n:] + } + case 2, 3, 4, 5: + if typ == protowire.BytesType { + v, n := protowire.ConsumeString(data) + if n < 0 { + return fmt.Errorf("invalid string") + } + switch num { + case 2: + x.Os = v + case 3: + x.Arch = v + case 4: + x.OldVersion = v + case 5: + x.NewVersion = v + } + data = data[n:] + } + default: + n := protowire.ConsumeFieldValue(num, typ, data) + if n < 0 { + return fmt.Errorf("invalid field value") + } + data = data[n:] + } + } + return nil +} + +// FindAllUpgradeNSNodesWithNSClusterIdResponse 列出所有需要升级的NS节点 +type FindAllUpgradeNSNodesWithNSClusterIdResponse struct { + Nodes []*FindAllUpgradeNSNodesWithNSClusterIdResponse_NSNodeUpgrade `protobuf:"bytes,1,rep,name=nodes,proto3" json:"nodes,omitempty"` +} + +func (x *FindAllUpgradeNSNodesWithNSClusterIdResponse) Reset() { + *x = FindAllUpgradeNSNodesWithNSClusterIdResponse{} +} +func (x *FindAllUpgradeNSNodesWithNSClusterIdResponse) String() string { + return fmt.Sprintf("%+v", *x) +} +func (x *FindAllUpgradeNSNodesWithNSClusterIdResponse) ProtoMessage() {} + +func (x *FindAllUpgradeNSNodesWithNSClusterIdResponse) GetNodes() []*FindAllUpgradeNSNodesWithNSClusterIdResponse_NSNodeUpgrade { + if x != nil { + return x.Nodes + } + return nil +} + +func (x *FindAllUpgradeNSNodesWithNSClusterIdResponse) Marshal() ([]byte, error) { + var b []byte + for _, node := range x.Nodes { + nodeData, err := node.Marshal() + if err != nil { + return nil, err + } + b = protowire.AppendTag(b, 1, protowire.BytesType) + b = protowire.AppendBytes(b, nodeData) + } + return b, nil +} + +func (x *FindAllUpgradeNSNodesWithNSClusterIdResponse) Unmarshal(data []byte) error { + for len(data) > 0 { + num, typ, n := protowire.ConsumeTag(data) + if n < 0 { + return fmt.Errorf("invalid tag") + } + data = data[n:] + switch num { + case 1: + if typ == protowire.BytesType { + v, n := protowire.ConsumeBytes(data) + if n < 0 { + return fmt.Errorf("invalid bytes") + } + node := &FindAllUpgradeNSNodesWithNSClusterIdResponse_NSNodeUpgrade{} + if err := node.Unmarshal(v); err != nil { + return err + } + x.Nodes = append(x.Nodes, node) + data = data[n:] + } + default: + n := protowire.ConsumeFieldValue(num, typ, data) + if n < 0 { + return fmt.Errorf("invalid field value") + } + data = data[n:] + } + } + return nil +} + +// UpgradeNSNodeRequest 升级单个NS节点 +type UpgradeNSNodeRequest struct { + NsNodeId int64 `protobuf:"varint,1,opt,name=nsNodeId,proto3" json:"nsNodeId,omitempty"` +} + +func (x *UpgradeNSNodeRequest) Reset() { *x = UpgradeNSNodeRequest{} } +func (x *UpgradeNSNodeRequest) String() string { return fmt.Sprintf("%+v", *x) } +func (x *UpgradeNSNodeRequest) ProtoMessage() {} + +func (x *UpgradeNSNodeRequest) GetNsNodeId() int64 { + if x != nil { + return x.NsNodeId + } + return 0 +} + +func (x *UpgradeNSNodeRequest) Marshal() ([]byte, error) { + var b []byte + if x.NsNodeId != 0 { + b = protowire.AppendTag(b, 1, protowire.VarintType) + b = protowire.AppendVarint(b, uint64(x.NsNodeId)) + } + return b, nil +} + +func (x *UpgradeNSNodeRequest) Unmarshal(data []byte) error { + for len(data) > 0 { + num, typ, n := protowire.ConsumeTag(data) + if n < 0 { + return fmt.Errorf("invalid tag") + } + data = data[n:] + switch num { + case 1: + if typ == protowire.VarintType { + v, n := protowire.ConsumeVarint(data) + if n < 0 { + return fmt.Errorf("invalid varint") + } + x.NsNodeId = int64(v) + data = data[n:] + } + default: + n := protowire.ConsumeFieldValue(num, typ, data) + if n < 0 { + return fmt.Errorf("invalid field value") + } + data = data[n:] + } + } + return nil +} diff --git a/EdgeCommon/pkg/systemconfigs/upgrade_config.go b/EdgeCommon/pkg/systemconfigs/upgrade_config.go new file mode 100644 index 0000000..e511cd3 --- /dev/null +++ b/EdgeCommon/pkg/systemconfigs/upgrade_config.go @@ -0,0 +1,12 @@ +package systemconfigs + +// UpgradeConfig 升级设置 +type UpgradeConfig struct { + AutoUpgrade bool `json:"autoUpgrade"` // 是否开启自动升级(控制EdgeNode、EdgeDNS、EdgeHTTPDNS三个模块) +} + +func NewUpgradeConfig() *UpgradeConfig { + return &UpgradeConfig{ + AutoUpgrade: false, + } +}