summaryrefslogtreecommitdiff
path: root/docs-source/index.rst
diff options
context:
space:
mode:
Diffstat (limited to 'docs-source/index.rst')
-rw-r--r--docs-source/index.rst26
1 files changed, 13 insertions, 13 deletions
diff --git a/docs-source/index.rst b/docs-source/index.rst
index f7d0a70..bcf7c75 100644
--- a/docs-source/index.rst
+++ b/docs-source/index.rst
@@ -18,7 +18,7 @@ Install etcd
From source
...........
-.. code:: bash
+.. code-block:: bash
$ python setup.py install
@@ -29,7 +29,7 @@ Usage
Create a client object
......................
-.. code:: python
+.. code-block:: python
import etcd
@@ -42,7 +42,7 @@ Create a client object
Set a key
.........
-.. code:: python
+.. code-block:: python
client.set('/nodes/n1', 1)
# with ttl
@@ -51,7 +51,7 @@ Set a key
Get a key
.........
-.. code:: python
+.. code-block:: python
client.get('/nodes/n2').value
@@ -59,7 +59,7 @@ Get a key
Delete a key
............
-.. code:: python
+.. code-block:: python
client.delete('/nodes/n1')
@@ -67,7 +67,7 @@ Delete a key
Test and set
............
-.. code:: python
+.. code-block:: python
client.test_and_set('/nodes/n2', 2, 4) # will set /nodes/n2 's value to 2 only if its previous value was 4
@@ -75,7 +75,7 @@ Test and set
Watch a key
...........
-.. code:: python
+.. code-block:: python
client.watch('/nodes/n1') # will wait till the key is changed, and return once its changed
@@ -83,7 +83,7 @@ Watch a key
List sub keys
.............
-.. code:: python
+.. code-block:: python
# List nodes in the cluster
client.get('/nodes')
@@ -95,7 +95,7 @@ List sub keys
Get machines in the cluster
...........................
-.. code:: python
+.. code-block:: python
client.machines
@@ -103,7 +103,7 @@ Get machines in the cluster
Get leader of the cluster
.........................
-.. code:: python
+.. code-block:: python
client.leader
@@ -115,7 +115,7 @@ Development setup
To create a buildout,
-.. code:: bash
+.. code-block:: bash
$ python bootstrap.py
$ bin/buildout
@@ -123,13 +123,13 @@ To create a buildout,
to test you should have etcd available in your system path:
-.. code:: bash
+.. code-block:: bash
$ bin/test
to generate documentation,
-.. code:: bash
+.. code-block:: bash
$ cd docs
$ make