memcache-0.0.1: A memcached client library.

Safe HaskellNone
LanguageHaskell98

Database.Memcache.Cluster

Description

Handles a group of connections to different memcache servers.

Synopsis

Documentation

data Cluster Source

A memcached cluster.

Instances

newMemcacheCluster :: [(HostName, PortNumber)] -> Options -> IO Cluster Source

Establish a new connection to a group of memcached servers.

data Options Source

Constructors

Options 

Fields

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

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

Run a memcache 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 memcache operation against any single server in the cluster.

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

Run a memcache operation against all servers in the cluster.