@@ -84,8 +84,7 @@ func (*exampleResolver) Scheme() string {
84
84
}
85
85
86
86
func main () {
87
- // First it sends 5 requests using the default DNS and pickfirst load
88
- // balancer.
87
+ // First send 5 requests using the default DNS and pickfirst load balancer.
89
88
log .Print ("**** Use default DNS resolver ****" )
90
89
target := fmt .Sprintf ("localhost:%d" , port1 )
91
90
cc , err := grpc .NewClient (target , grpc .WithTransportCredentials (insecure .NewCredentials ()))
@@ -122,8 +121,7 @@ func main() {
122
121
// Send 10 requests using the example nameresolver and round robin load
123
122
// balancer. These requests are evenly distributed among the 3 servers
124
123
// rather than favoring the server listening on both addresses because the
125
- // resolver groups the 3 servers as 3 endpoints each
126
- // with 2 addresses.
124
+ // resolver groups the 3 servers as 3 endpoints each with 2 addresses.
127
125
if err := waitForDistribution (ctx , client ); err != nil {
128
126
log .Panic (err )
129
127
}
@@ -139,7 +137,7 @@ func waitForDistribution(ctx context.Context, client hwpb.GreeterClient) error {
139
137
// Since the IPv6 address comes first in the resolver list, it will be
140
138
// given higher priority.
141
139
fmt .Sprintf ("[::1]:%d" , port1 ),
142
- // Server 1 is listening only on the IPv4 loopback address.
140
+ // Server 2 is listening only on the IPv4 loopback address.
143
141
fmt .Sprintf ("127.0.0.1:%d" , port2 ),
144
142
// Server 3 is listening only on the IPv6 loopback address.
145
143
fmt .Sprintf ("[::1]:%d" , port3 ),
0 commit comments