Skip to content

Commit

Permalink
Remove the unused method
Browse files Browse the repository at this point in the history
Signed-off-by: JmPotato <[email protected]>
  • Loading branch information
JmPotato committed Nov 13, 2023
1 parent 3eff39e commit 724daee
Showing 1 changed file with 0 additions and 19 deletions.
19 changes: 0 additions & 19 deletions client/http/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -74,25 +74,6 @@ type RegionsInfo struct {
Regions []RegionInfo `json:"regions"`
}

// Merge merges two RegionsInfo together and returns a new one.
func (ri *RegionsInfo) Merge(other *RegionsInfo) *RegionsInfo {
newRegionsInfo := &RegionsInfo{
Regions: make([]RegionInfo, 0, ri.Count+other.Count),
}
m := make(map[int64]RegionInfo, ri.Count+other.Count)
for _, region := range ri.Regions {
m[region.ID] = region
}
for _, region := range other.Regions {
m[region.ID] = region
}
for _, region := range m {
newRegionsInfo.Regions = append(newRegionsInfo.Regions, region)
}
newRegionsInfo.Count = int64(len(newRegionsInfo.Regions))
return newRegionsInfo
}

// StoreHotPeersInfos is used to get human-readable description for hot regions.
type StoreHotPeersInfos struct {
AsPeer StoreHotPeersStat `json:"as_peer"`
Expand Down

0 comments on commit 724daee

Please sign in to comment.