Registry / database / etcd-client-v2

etcd-client-v2

JSON →
library2.305.26gogounverified

Package client provides bindings for the etcd APIs.

go get go.etcd.io/etcd/client/v2
INSTALL
IMPORT
SIG · ETCD-CLIENT-V2
E
etcd-client-v2
databasegov2.305.26
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

client
✓ go.etcd.io/etcd/client/v2

Connect to etcd and get a key's value.

package main import ( "fmt" "go.etcd.io/etcd/client/v2" ) func main() { cfg := client.Config{ Endpoints: []string{"http://127.0.0.1:2379"}, } c, err := client.New(cfg) if err != nil { panic(err) } kapi := client.NewKeysAPI(c) resp, err := kapi.Get(nil, "/foo", nil) if err != nil { panic(err) } fmt.Println(resp.Node.Value) }
Debug
Known issues
breakingetcd client v2 is deprecated in favor of client v3.
fix
Use go.etcd.io/etcd/client/v3 for new projects.
affects: >=3.0
Upgrade
Version history
2.305.26latest on pkg.go.dev
Audit
Dependencies

No dependency data recorded yet.

Agent activity
15 hits · last 30 days
node
12
OpenAI (training)
1
Resources
etcd-client-v2 — go get etcd-client-v2 · libregistry