1
0
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:
Benjamin Wang
2026-01-27 17:35:43 +00:00
parent 783fb9214a
commit 84862dbd67
2 changed files with 2 additions and 6 deletions

View File

@@ -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
}

View File

@@ -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,
},
},
}