mirror of
https://github.com/etcd-io/etcd.git
synced 2026-02-05 06:46:49 +01:00
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>
This commit is contained in:
@@ -29,11 +29,8 @@ type Endpoint struct {
|
||||
// Since etcd 3.1
|
||||
Addr string
|
||||
|
||||
// Metadata is the information associated with Addr, which may be used
|
||||
// to make load balancing decision.
|
||||
// Metadata is the information associated with Addr.
|
||||
// Since etcd 3.1
|
||||
//
|
||||
// Deprecated: The field is deprecated and will be removed in 3.7.
|
||||
Metadata any
|
||||
}
|
||||
|
||||
|
||||
@@ -112,8 +112,7 @@ func convertToGRPCEndpoint(ups map[string]*endpoints.Update) []gresolver.Endpoin
|
||||
ep := gresolver.Endpoint{
|
||||
Addresses: []gresolver.Address{
|
||||
{
|
||||
Addr: up.Endpoint.Addr,
|
||||
Metadata: up.Endpoint.Metadata, //nolint:staticcheck // TODO: remove for a supported version
|
||||
Addr: up.Endpoint.Addr,
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user