实现缓存策略的部分功能

This commit is contained in:
刘祥超
2020-10-04 14:27:14 +08:00
parent 9c6efad81f
commit 97f9bb27e7
13 changed files with 762 additions and 197 deletions

View File

@@ -136,7 +136,13 @@ func (this *Queue) InstallNode(nodeId int64) error {
apiEndpoints := []string{}
for _, apiNode := range apiNodes {
apiEndpoints = append(apiEndpoints, apiNode.Host+":"+strconv.Itoa(int(apiNode.Port)))
addrConfigs, err := apiNode.DecodeAccessAddrs()
if err != nil {
return errors.New("decode api node access addresses failed: " + err.Error())
}
for _, addrConfig := range addrConfigs {
apiEndpoints = append(apiEndpoints, addrConfig.FullAddresses()...)
}
}
params := &NodeParams{