Skip to content

Commit 6f38b7d

Browse files
committed
docs: remove deprecated Metadata field from gRPC naming examples
The `Metadata` field is deprecated and should no longer appear in documentation examples. This updates etcd v3.5 and v3.6 gRPC naming guides to reflect the current usage. Also there is a slight update from `grpc.Dial` to `grpc.NewClient` Signed-off-by: amosehiguese <amosehiguese@gmail.com>
1 parent ccc497b commit 6f38b7d

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

‎content/en/docs/v3.5/dev-guide/grpc_naming.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ Endpoints are added to the service by creating new keys and removed from the ser
4444
New endpoints can be added to the service through `etcdctl`:
4545

4646
```sh
47-
ETCDCTL_API=3 etcdctl put foo/bar/my-service/1.2.3.4 '{"Addr":"1.2.3.4","Metadata":"..."}'
47+
ETCDCTL_API=3 etcdctl put foo/bar/my-service/1.2.3.4 '{"Addr":"1.2.3.4"}'
4848
```
4949

5050
The etcd client's `endpoints.Manager` method can also register new endpoints with a key matching the `Addr`:
@@ -59,8 +59,8 @@ To enable round-robin load balancing when dialing service with multiple endpoint
5959

6060
```go
6161

62-
conn, gerr := grpc.Dial("etcd:///foo", grpc.WithResolvers(etcdResolver),
63-
grpc.WithDefaultServiceConfig(`{"loadBalancingPolicy":"round_robin"}`))
62+
conn, gerr := grpc.NewClient("etcd:///foo", grpc.WithResolvers(etcdResolver),
63+
grpc.WithDefaultServiceConfig(`{"loadBalancingPolicy":"round_robin"}`))
6464
```
6565

6666
### Deleting an endpoint
@@ -84,7 +84,7 @@ Registering an endpoint with a lease ensures that if the host can't maintain a k
8484

8585
```sh
8686
lease=`ETCDCTL_API=3 etcdctl lease grant 5 | cut -f2 -d' '`
87-
ETCDCTL_API=3 etcdctl put --lease=$lease my-service/1.2.3.4 '{"Addr":"1.2.3.4","Metadata":"..."}'
87+
ETCDCTL_API=3 etcdctl put --lease=$lease my-service/1.2.3.4 '{"Addr":"1.2.3.4"}'
8888
ETCDCTL_API=3 etcdctl lease keep-alive $lease
8989
```
9090
In the golang:

‎content/en/docs/v3.6/dev-guide/grpc_naming.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ Endpoints are added to the service by creating new keys and removed from the ser
4444
New endpoints can be added to the service through `etcdctl`:
4545

4646
```sh
47-
ETCDCTL_API=3 etcdctl put foo/bar/my-service/1.2.3.4 '{"Addr":"1.2.3.4","Metadata":"..."}'
47+
ETCDCTL_API=3 etcdctl put foo/bar/my-service/1.2.3.4 '{"Addr":"1.2.3.4"}'
4848
```
4949

5050
The etcd client's `endpoints.Manager` method can also register new endpoints with a key matching the `Addr`:
@@ -59,8 +59,8 @@ To enable round-robin load balancing when dialing service with multiple endpoint
5959

6060
```go
6161

62-
conn, gerr := grpc.Dial("etcd:///foo", grpc.WithResolvers(etcdResolver),
63-
grpc.WithDefaultServiceConfig(`{"loadBalancingPolicy":"round_robin"}`))
62+
conn, gerr := grpc.NewClient("etcd:///foo", grpc.WithResolvers(etcdResolver),
63+
grpc.WithDefaultServiceConfig(`{"loadBalancingPolicy":"round_robin"}`))
6464
```
6565

6666
### Deleting an endpoint
@@ -84,7 +84,7 @@ Registering an endpoint with a lease ensures that if the host can't maintain a k
8484

8585
```sh
8686
lease=`ETCDCTL_API=3 etcdctl lease grant 5 | cut -f2 -d' '`
87-
ETCDCTL_API=3 etcdctl put --lease=$lease my-service/1.2.3.4 '{"Addr":"1.2.3.4","Metadata":"..."}'
87+
ETCDCTL_API=3 etcdctl put --lease=$lease my-service/1.2.3.4 '{"Addr":"1.2.3.4"}'
8888
ETCDCTL_API=3 etcdctl lease keep-alive $lease
8989
```
9090
In the golang:

0 commit comments

Comments
 (0)