memcache-0.1.0.1: A memcached client library.

Safe HaskellNone
LanguageHaskell2010

Database.Memcache.Cluster

Description

Handles a group of connections to different memcached servers.

Synopsis

Documentation

data Cluster Source

A memcached cluster client.

Instances

newCluster :: [ServerSpec] -> Options -> IO Cluster Source

Establish a new connection to a group of memcached servers.

data ServerSpec Source

ServerSpec specifies a server configuration to connect to.

defaultServerSpec :: ServerSpec Source

Provides a default value for a server cconnection config.

data Options Source

Options specifies how a memcached cluster should be configured.

Constructors

Options 

Fields

optsCmdFailure :: !FailureMode
 
optsServerFailure :: !FailureMode
 
optsServerRetries :: !Int
 

defaultOptions :: Options Source

Provides recommended default for a cluster Options.

keyedOp :: forall a. Maybe a -> Cluster -> Key -> (Server -> IO a) -> IO a Source

Run a memcached operation against a server that maps to the key given in the cluster.

anyOp :: forall a. Maybe a -> Cluster -> (Server -> IO a) -> IO a Source

Run a memcached operation against any single server in the cluster.

allOp :: forall a. Maybe a -> Cluster -> (Server -> IO a) -> IO [(Server, a)] Source

Run a memcached operation against all servers in the cluster.