etcd-0.1.0.1: Client for etcd, a highly-available key value store

Safe HaskellNone
LanguageHaskell2010

Data.Etcd

Synopsis

Documentation

data Client Source

Constructors

Client 

Fields

leaderUrl :: String
 
machines :: [String]
 

versionPrefix :: String Source

The version prefix used in URLs. The current client supports v2.

data Action Source

Each response comes with an "action" field, which describes what kind of action was performed.

Constructors

GET 
SET 
DELETE 
CREATE 
EXPIRE 
CAS 
CAD 

data Response Source

The server responds with this object to all successful requests.

Constructors

Response 

data Error Source

The server sometimes responds to errors with this error object.

Constructors

Error 

type HR = Either Error Response Source

  • --------------------------------------------------------------------------

Low-level HTTP interface

The functions here are used internally when sending requests to etcd. If the server is running, the result is 'Either Error Response'. These functions may throw an exception if the server is unreachable or not responding.

runRequest :: IO HR -> IO HR Source

Run a low-level HTTP request. Catch any exceptions and convert them into a 'Left Error'.

createClient :: [String] -> IO Client Source

  • --------------------------------------------------------------------------

Public API

Create a new client and initialize it with a list of seed machines. The list must be non-empty.