mochengqian commented on code in PR #971:
URL: https://github.com/apache/dubbo-go-pixiu/pull/971#discussion_r3371973114
##########
pkg/cluster/loadbalancer/roundrobin/round_robin.go:
##########
@@ -32,6 +33,13 @@ func init() {
type RoundRobin struct{}
+var _ loadbalancer.HealthyOnlySnapshotLoadBalancer = RoundRobin{}
+var _ loadbalancer.ZeroCopySnapshotLoadBalancer = RoundRobin{}
Review Comment:
Agreed — done in fceeb80d. Removed the `var _ ...SnapshotLoadBalancer`
assertions and the `Use*` methods; the balancer now opts in solely through
`SnapshotOptIn()`. The deprecated marker interfaces themselves are also deleted.
##########
pkg/cluster/loadbalancer/rand/load_balancer_rand.go:
##########
@@ -32,6 +33,13 @@ func init() {
type Rand struct{}
+var _ loadbalancer.HealthyOnlySnapshotLoadBalancer = Rand{}
+var _ loadbalancer.ZeroCopySnapshotLoadBalancer = Rand{}
Review Comment:
Agreed — done in fceeb80d. Removed the `var _ ...SnapshotLoadBalancer`
assertions and the `Use*` methods; the balancer now opts in solely through
`SnapshotOptIn()`. The deprecated marker interfaces themselves are also deleted.
##########
pkg/cluster/loadbalancer/ringhash/ring_hash.go:
##########
@@ -58,6 +59,13 @@ func NewRingHash(config model.ConsistentHash, endpoints
[]*model.Endpoint) model
type RingHashing struct{}
+var _ loadbalancer.HealthyOnlySnapshotLoadBalancer = RingHashing{}
+var _ loadbalancer.ZeroCopySnapshotLoadBalancer = RingHashing{}
Review Comment:
Agreed — done in fceeb80d. Removed the `var _ ...SnapshotLoadBalancer`
assertions and the `Use*` methods; the balancer now opts in solely through
`SnapshotOptIn()`. The deprecated marker interfaces themselves are also deleted.
##########
pkg/cluster/loadbalancer/maglev/maglev_hash.go:
##########
@@ -50,6 +51,13 @@ func NewMaglevHash(config model.ConsistentHash, endpoints
[]*model.Endpoint) mod
type MaglevHash struct{}
+var _ loadbalancer.HealthyOnlySnapshotLoadBalancer = MaglevHash{}
+var _ loadbalancer.ZeroCopySnapshotLoadBalancer = MaglevHash{}
Review Comment:
Agreed — done in fceeb80d. Removed the `var _ ...SnapshotLoadBalancer`
assertions and the `Use*` methods; the balancer now opts in solely through
`SnapshotOptIn()`. The deprecated marker interfaces themselves are also deleted.
##########
pkg/cluster/loadbalancer/weightrandom/weight_random.go:
##########
@@ -40,6 +41,13 @@ type weightedEndpoint struct {
// It assigns weights to endpoints and uses these weights to influence the
probability of selection.
type WeightRandom struct{}
+var _ loadbalancer.HealthyOnlySnapshotLoadBalancer = WeightRandom{}
+var _ loadbalancer.ZeroCopySnapshotLoadBalancer = WeightRandom{}
Review Comment:
Agreed — done in fceeb80d. Removed the `var _ ...SnapshotLoadBalancer`
assertions and the `Use*` methods; the balancer now opts in solely through
`SnapshotOptIn()`. The deprecated marker interfaces themselves are also deleted.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]