Name | Date | Size | #Lines | LOC | ||
---|---|---|---|---|---|---|
.. | 03-May-2022 | - | ||||
etcd/ | H | 16-Apr-2015 | - | 2,664 | 1,953 | |
.gitignore | H A D | 16-Apr-2015 | 12 | 2 | 1 | |
LICENSE | H A D | 16-Apr-2015 | 11.1 KiB | 203 | 169 | |
README.md | H A D | 16-Apr-2015 | 704 | 37 | 24 |
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