• Home
  • History
  • Annotate
Name Date Size #Lines LOC

..03-May-2022-

etcd/H16-Apr-2015-2,6641,953

.gitignoreH A D16-Apr-201512 21

LICENSEH A D16-Apr-201511.1 KiB203169

README.mdH A D16-Apr-2015704 3724

README.md

1# go-etcd
2
3[![GoDoc](https://godoc.org/github.com/coreos/go-etcd/etcd?status.png)](https://godoc.org/github.com/coreos/go-etcd/etcd)
4
5## Usage
6
7The current version of go-etcd supports etcd v2.0+, if you need support for etcd v0.4 please use go-etcd from the [release-0.4](https://github.com/coreos/go-etcd/tree/release-0.4) branch.
8
9```
10package main
11
12import (
13    "log"
14
15    "github.com/coreos/go-etcd/etcd"
16)
17
18func main() {
19    machines := []string{"http://127.0.0.1:2379"}
20    client := etcd.NewClient(machines)
21
22    if _, err := client.Set("/foo", "bar", 0); err != nil {
23        log.Fatal(err)
24    }
25}
26```
27
28## Install
29
30```bash
31go get github.com/coreos/go-etcd/etcd
32```
33
34## License
35
36See LICENSE file.
37