-- Hoogle documentation, generated by Haddock -- See Hoogle, http://www.haskell.org/hoogle/ -- | memcached client using binary protocol. -- @package memcached-binary @version 0.1.1 module Database.Memcached.Binary.Types.Exception data MemcachedException MemcachedException :: {-# UNPACK #-} !Word16 -> {-# UNPACK #-} !ByteString -> MemcachedException isKeyNotFound :: MemcachedException -> Bool isKeyExists :: MemcachedException -> Bool isValueTooLarge :: MemcachedException -> Bool isInvalidArguments :: MemcachedException -> Bool isItemNotStored :: MemcachedException -> Bool isIncrDecrOnNonNumeric :: MemcachedException -> Bool isVBucketBelongsToAnotherServer :: MemcachedException -> Bool isAuthenticationError :: MemcachedException -> Bool isAuthenticationContinue :: MemcachedException -> Bool isUnknownCommand :: MemcachedException -> Bool isOutOfMemory :: MemcachedException -> Bool isNotSupported :: MemcachedException -> Bool isInternalError :: MemcachedException -> Bool isBusy :: MemcachedException -> Bool isTemporaryFailure :: MemcachedException -> Bool instance Typeable MemcachedException instance Show MemcachedException instance Exception MemcachedException module Database.Memcached.Binary.Types type User = ByteString type Password = ByteString data Auth Plain :: User -> Password -> Auth data ConnectInfo ConnectInfo :: HostName -> PortID -> [Auth] -> Int -> NominalDiffTime -> ConnectInfo connectHost :: ConnectInfo -> HostName connectPort :: ConnectInfo -> PortID connectAuth :: ConnectInfo -> [Auth] numConnection :: ConnectInfo -> Int connectionIdleTime :: ConnectInfo -> NominalDiffTime -- |
--   def = ConnectInfo "localhost" (PortNumber 11211) [] 1 20
--   
type Flags = Word32 type Key = ByteString type Value = ByteString type Expiry = Word32 newtype CAS CAS :: Word64 -> CAS type Delta = Word64 type Initial = Word64 type Counter = Word64 instance Show Auth instance Show ConnectInfo instance Show CAS instance Default ConnectInfo module Database.Memcached.Binary.Either data Connection withConnection :: ConnectInfo -> (Connection -> IO a) -> IO a connect :: ConnectInfo -> IO Connection close :: Connection -> IO () get :: Key -> Connection -> IO (Either MemcachedException (Flags, Value)) get_ :: Key -> Connection -> IO (Either MemcachedException Value) set :: Flags -> Expiry -> Key -> Value -> Connection -> IO (Maybe MemcachedException) add :: Flags -> Expiry -> Key -> Value -> Connection -> IO (Maybe MemcachedException) replace :: Flags -> Expiry -> Key -> Value -> Connection -> IO (Maybe MemcachedException) delete :: Key -> Connection -> IO (Maybe MemcachedException) increment :: Expiry -> Key -> Delta -> Initial -> Connection -> IO (Either MemcachedException Counter) decrement :: Expiry -> Key -> Delta -> Initial -> Connection -> IO (Either MemcachedException Counter) -- | flush all value. flushAll :: Connection -> IO (Maybe MemcachedException) version :: Connection -> IO (Either MemcachedException Version) -- | get version string. versionString :: Connection -> IO (Either MemcachedException ByteString) -- | noop(use for keepalive). noOp :: Connection -> IO (Maybe MemcachedException) append :: Key -> Value -> Connection -> IO (Maybe MemcachedException) prepend :: Key -> Value -> Connection -> IO (Maybe MemcachedException) -- | change expiry. touch :: Expiry -> Key -> Connection -> IO (Maybe MemcachedException) -- | get value/change expiry. getAndTouch :: Expiry -> Key -> Connection -> IO (Either MemcachedException (Flags, Value)) -- | get value/change expiry. getAndTouch_ :: Expiry -> Key -> Connection -> IO (Either MemcachedException Value) -- | modify value in transaction. modify :: Expiry -> Key -> (Flags -> Value -> (Flags, Value, a)) -> Connection -> IO (Either MemcachedException a) -- | modify value in transaction. modify_ :: Expiry -> Key -> (Flags -> Value -> (Flags, Value)) -> Connection -> IO (Maybe MemcachedException) module Database.Memcached.Binary.IO data Connection withConnection :: ConnectInfo -> (Connection -> IO a) -> IO a connect :: ConnectInfo -> IO Connection close :: Connection -> IO () get :: Key -> Connection -> IO ((Flags, Value)) get_ :: Key -> Connection -> IO (Value) set :: Flags -> Expiry -> Key -> Value -> Connection -> IO () add :: Flags -> Expiry -> Key -> Value -> Connection -> IO () replace :: Flags -> Expiry -> Key -> Value -> Connection -> IO () delete :: Key -> Connection -> IO () increment :: Expiry -> Key -> Delta -> Initial -> Connection -> IO (Counter) decrement :: Expiry -> Key -> Delta -> Initial -> Connection -> IO (Counter) -- | flush all value. flushAll :: Connection -> IO () version :: Connection -> IO (Version) -- | get version string. versionString :: Connection -> IO (ByteString) -- | noop(use for keepalive). noOp :: Connection -> IO () append :: Key -> Value -> Connection -> IO () prepend :: Key -> Value -> Connection -> IO () -- | change expiry. touch :: Expiry -> Key -> Connection -> IO () -- | get value/change expiry. getAndTouch :: Expiry -> Key -> Connection -> IO ((Flags, Value)) -- | get value/change expiry. getAndTouch_ :: Expiry -> Key -> Connection -> IO (Value) -- | modify value in transaction. modify :: Expiry -> Key -> (Flags -> Value -> (Flags, Value, a)) -> Connection -> IO (a) -- | modify value in transaction. modify_ :: Expiry -> Key -> (Flags -> Value -> (Flags, Value)) -> Connection -> IO () module Database.Memcached.Binary.Maybe data Connection withConnection :: ConnectInfo -> (Connection -> IO a) -> IO a connect :: ConnectInfo -> IO Connection close :: Connection -> IO () get :: Key -> Connection -> IO (Maybe (Flags, Value)) get_ :: Key -> Connection -> IO (Maybe Value) set :: Flags -> Expiry -> Key -> Value -> Connection -> IO Bool add :: Flags -> Expiry -> Key -> Value -> Connection -> IO Bool replace :: Flags -> Expiry -> Key -> Value -> Connection -> IO Bool delete :: Key -> Connection -> IO Bool increment :: Expiry -> Key -> Delta -> Initial -> Connection -> IO (Maybe Counter) decrement :: Expiry -> Key -> Delta -> Initial -> Connection -> IO (Maybe Counter) -- | flush all value. flushAll :: Connection -> IO Bool version :: Connection -> IO (Maybe Version) -- | get version string. versionString :: Connection -> IO (Maybe ByteString) -- | noop(use for keepalive). noOp :: Connection -> IO Bool append :: Key -> Value -> Connection -> IO Bool prepend :: Key -> Value -> Connection -> IO Bool -- | change expiry. touch :: Expiry -> Key -> Connection -> IO Bool -- | get value/change expiry. getAndTouch :: Expiry -> Key -> Connection -> IO (Maybe (Flags, Value)) -- | get value/change expiry. getAndTouch_ :: Expiry -> Key -> Connection -> IO (Maybe Value) -- | modify value in transaction. modify :: Expiry -> Key -> (Flags -> Value -> (Flags, Value, a)) -> Connection -> IO (Maybe a) -- | modify value in transaction. modify_ :: Expiry -> Key -> (Flags -> Value -> (Flags, Value)) -> Connection -> IO Bool -- | Warning: use Database.Memcached.Binary.Maybe(or Either, IO) -- instead. module Database.Memcached.Binary