Skip to content

Commit 7cfd482

Browse files
committed
Remove the use of grpc-go's Metadata field
We also revoke the deprecation of the Metadata field, Users can store whatever information related to each endpoint. We just don't need to pass the value to grpc-go's Metadata. Signed-off-by: Benjamin Wang <benjamin.ahrtr@gmail.com>
1 parent 5e2addd commit 7cfd482

File tree

2 files changed

+2
-4
lines changed

2 files changed

+2
-4
lines changed

clientv3/naming/endpoints/endpoints.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,7 @@ type Endpoint struct {
2929
// Since etcd 3.1
3030
Addr string
3131

32-
// Metadata is the information associated with Addr, which may be used
33-
// to make load balancing decision.
32+
// Metadata is the information associated with Addr.
3433
// Since etcd 3.1
3534
Metadata interface{}
3635
}

clientv3/naming/resolver/resolver.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -110,8 +110,7 @@ func convertToGRPCAddress(ups map[string]*endpoints.Update) []gresolver.Address
110110
var addrs []gresolver.Address
111111
for _, up := range ups {
112112
addr := gresolver.Address{
113-
Addr: up.Endpoint.Addr,
114-
Metadata: up.Endpoint.Metadata,
113+
Addr: up.Endpoint.Addr,
115114
}
116115
addrs = append(addrs, addr)
117116
}

0 commit comments

Comments
 (0)