etcd-demo

command
v0.0.0-...-a28fdf5 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 1, 2017 License: MIT Imports: 9 Imported by: 0

README

etcd v3 API demo

For simplicity, we use http://127.0.0.1:2379 as etcd server, please make sure etcd is running and listening at the right ip and port.

Run

Before start, please install etcd client library:

go get github.com/coreos/etcd/clientv3

Demos

Include:

  • set a simple key
  • get value of a simple key
  • delete a simple key
  • use prefix to list dir-like values
  • set ttl to key
  • transcation commands
  • watch changes

Not included(but easy to implement):

  • lease
    • revoke a lease
    • keepalive a lease
    • get lease information
  • get history value of a key
  • get list of keys with sort and pagination

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL