Skip to content
This repository has been archived by the owner on Jul 11, 2023. It is now read-only.

ref(pkg): update NewRouteWeightedClusters method #2892

Merged
merged 2 commits into from
Mar 16, 2021

Conversation

michelleN
Copy link
Contributor

Signed-off-by: Michelle Noorali minooral@microsoft.com

Please mark with X for applicable areas.

-->
Affected area:

  • New Functionality [ ]
  • Documentation [ ]
  • Install [ ]
  • Control Plane [ X]
  • CLI Tool [ ]
  • Certificate Management [ ]
  • Networking [ ]
  • Metrics [ ]
  • SMI Policy [ ]
  • Security [ ]
  • Tests [ ]
  • CI System [ ]
  • Demo [ ]
  • Performance [ ]
  • Other [ ]

Please answer the following questions with yes/no.

  • Does this change contain code from or inspired by another project? If so, did you notify the maintainers and provide attribution? No

+ now accepts a slice of service.WeightedCluster
+ easier to create RouteWeightedCluster now where there
is more than one backend/weighted cluster
+ prep for openservicemesh#2368

Signed-off-by: Michelle Noorali <minooral@microsoft.com>
@michelleN michelleN requested a review from a team as a code owner March 16, 2021 18:52
Signed-off-by: Michelle Noorali <minooral@microsoft.com>
@@ -10,10 +10,15 @@ import (
)

// NewRouteWeightedCluster takes a route and weighted cluster and returns a *RouteWeightedCluster
func NewRouteWeightedCluster(route HTTPRouteMatch, weightedCluster service.WeightedCluster) *RouteWeightedClusters {
func NewRouteWeightedCluster(route HTTPRouteMatch, weightedClusters []service.WeightedCluster) *RouteWeightedClusters {
weightedClusterSet := set.NewSet()
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wish we used set instead of mapset, which is the name of @deckarep's package

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not quite sure I understand what you mean! Would you mind expanding? @draychev

@michelleN michelleN merged commit a1c10b0 into openservicemesh:main Mar 16, 2021
@michelleN michelleN deleted the trafficpolicy branch March 16, 2021 20:17
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants