etcdctl

command module
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Aug 19, 2013 License: Apache-2.0 Imports: 9 Imported by: 0

README

etcdctl

Build Status

etcdctl is a command line client for etcd. It can be used in scripts or for administrators to explore an etcd cluster.

Getting etcdctl

The latest release is available as a binary at Github along with etcd.

You can also build etcdctl from source:

./build

Usage

Key Value Storage

Setting a key on /foo/bar:

etcdctl set /foo/bar "Hello world"
Hello world

Getting a key:

etcdctl get /foo/bar
Hello world

Deleting a key:

etcdctl delete /foo/bar
Hello world

Tailing a key:

etcdctl watch /foo/bar -f
Hello world
.... client hangs forever until ctrl+C printing values as key change
Sets

etcdctl implements sets on top of the key-value store that etcd provides. These are useful for storing lists of unique items. A common use-case is servers of a particular type that register themselves under an etcd key, so that they can be detected and used by clients.

Adding members to a set:

etcdctl sadd /queues amqp://user:password@rabbitmq1
amqp://user:password@rabbitmq1
etcdctl sadd /queues amqp://user:password@rabbitmq2 --ttl=60
amqp://user:password@rabbitmq2

List all members:

etcdctl smembers /queues
amqp://user:password@rabbitmq1
amqp://user:password@rabbitmq2

To delete a member:

etcdctl sdel /queues amqp://user:password@rabbitmq1

Return Codes

0 Success

1 Malformed etcdctl arguments

2 Failed to connect to host

3 Failed to auth (client cert rejected, ca validation failure, etc)

4 400 error from etcd

5 500 error from etcd

Project Details

Versioning

etcdctl uses semantic versioning. Releases will follow lockstep with the etcd release cycle.

License

etcdctl is under the Apache 2.0 license. See the LICENSE file for details.

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
third_party
bitbucket.org/kardianos/osext
Extensions to the standard "os" package.
Extensions to the standard "os" package.
github.com/ccding/go-logging/logging
Package logging implements log library for other applications.
Package logging implements log library for other applications.

Jump to

Keyboard shortcuts

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