mirror of
https://github.com/etcd-io/etcd.git
synced 2024-09-27 06:25:44 +00:00
client,clientv3: update client docs to "go.etcd.io"
This commit is contained in:
parent
d627719881
commit
fc7ef659cc
@ -2,14 +2,14 @@
|
|||||||
|
|
||||||
etcd/client is the Go client library for etcd.
|
etcd/client is the Go client library for etcd.
|
||||||
|
|
||||||
[](https://godoc.org/github.com/coreos/etcd/client)
|
[](https://godoc.org/go.etcd.io/etcd/client)
|
||||||
|
|
||||||
For full compatibility, it is recommended to vendor builds using etcd's vendored packages, using tools like `golang/dep`, as in [vendor directories](https://golang.org/cmd/go/#hdr-Vendor_Directories).
|
For full compatibility, it is recommended to vendor builds using etcd's vendored packages, using tools like `golang/dep`, as in [vendor directories](https://golang.org/cmd/go/#hdr-Vendor_Directories).
|
||||||
|
|
||||||
## Install
|
## Install
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
go get github.com/coreos/etcd/client
|
go get go.etcd.io/etcd/client
|
||||||
```
|
```
|
||||||
|
|
||||||
## Usage
|
## Usage
|
||||||
@ -22,7 +22,7 @@ import (
|
|||||||
"time"
|
"time"
|
||||||
"context"
|
"context"
|
||||||
|
|
||||||
"github.com/coreos/etcd/client"
|
"go.etcd.io/etcd/client"
|
||||||
)
|
)
|
||||||
|
|
||||||
func main() {
|
func main() {
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
# etcd/clientv3
|
# etcd/clientv3
|
||||||
|
|
||||||
[](https://etcd.readthedocs.io/en/latest/?badge=latest)
|
[](https://etcd.readthedocs.io/en/latest/?badge=latest)
|
||||||
[](https://godoc.org/github.com/coreos/etcd/clientv3)
|
[](https://godoc.org/go.etcd.io/etcd/clientv3)
|
||||||
|
|
||||||
`etcd/clientv3` is the official Go etcd client for v3.
|
`etcd/clientv3` is the official Go etcd client for v3.
|
||||||
|
|
||||||
@ -10,7 +10,7 @@ See https://etcd.readthedocs.io/en/latest for latest client architecture.
|
|||||||
## Install
|
## Install
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
go get github.com/coreos/etcd/clientv3
|
go get go.etcd.io/etcd/clientv3
|
||||||
```
|
```
|
||||||
|
|
||||||
## Get started
|
## Get started
|
||||||
@ -50,7 +50,7 @@ For full compatibility, it is recommended to vendor builds using etcd's vendored
|
|||||||
etcd client returns 2 types of errors:
|
etcd client returns 2 types of errors:
|
||||||
|
|
||||||
1. context error: canceled or deadline exceeded.
|
1. context error: canceled or deadline exceeded.
|
||||||
2. gRPC error: see [api/v3rpc/rpctypes](https://godoc.org/github.com/coreos/etcd/etcdserver/api/v3rpc/rpctypes).
|
2. gRPC error: see [api/v3rpc/rpctypes](https://godoc.org/go.etcd.io/etcd/etcdserver/api/v3rpc/rpctypes).
|
||||||
|
|
||||||
Here is the example code to handle client errors:
|
Here is the example code to handle client errors:
|
||||||
|
|
||||||
@ -76,7 +76,7 @@ The etcd client optionally exposes RPC metrics through [go-grpc-prometheus](http
|
|||||||
|
|
||||||
## Namespacing
|
## Namespacing
|
||||||
|
|
||||||
The [namespace](https://godoc.org/github.com/coreos/etcd/clientv3/namespace) package provides `clientv3` interface wrappers to transparently isolate client requests to a user-defined prefix.
|
The [namespace](https://godoc.org/go.etcd.io/etcd/clientv3/namespace) package provides `clientv3` interface wrappers to transparently isolate client requests to a user-defined prefix.
|
||||||
|
|
||||||
## Request size limit
|
## Request size limit
|
||||||
|
|
||||||
@ -84,4 +84,4 @@ Client request size limit is configurable via `clientv3.Config.MaxCallSendMsgSiz
|
|||||||
|
|
||||||
## Examples
|
## Examples
|
||||||
|
|
||||||
More code examples can be found at [GoDoc](https://godoc.org/github.com/coreos/etcd/clientv3).
|
More code examples can be found at [GoDoc](https://godoc.org/go.etcd.io/etcd/clientv3).
|
||||||
|
Loading…
x
Reference in New Issue
Block a user