| Safe Haskell | None |
|---|---|
| Language | Haskell2010 |
Database.Memcache.Cluster
Description
Handles a group of connections to different memcache servers.
- data Cluster
- newCluster :: [ServerSpec] -> Options -> IO Cluster
- data ServerSpec = ServerSpec {}
- defaultServerSpec :: ServerSpec
- data Options = Options {
- optsCmdFailure :: !FailureMode
- optsServerFailure :: !FailureMode
- optsServerRetries :: !Int
- defaultOptions :: Options
- keyedOp :: forall a. Maybe a -> Cluster -> Key -> (Server -> IO a) -> IO a
- anyOp :: forall a. Maybe a -> Cluster -> (Server -> IO a) -> IO a
- allOp :: forall a. Maybe a -> Cluster -> (Server -> IO a) -> IO [(Server, a)]
Documentation
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.
Constructors
| ServerSpec | |
Fields
| |
defaultServerSpec :: ServerSpec Source
Provides a default value for a server cconnection config.
Options specifies how a memcache cluster should be configured.
Constructors
| Options | |
Fields
| |
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 memcache operation against a server that maps to the key given in the cluster.