-- Hoogle documentation, generated by Haddock -- See Hoogle, http://www.haskell.org/hoogle/ -- | memcached client using binary protocol. -- @package memcached-binary @version 0.1.0 module Database.Memcached.Binary.Internal.Definition newtype OpCode OpCode :: Word8 -> OpCode opGet :: OpCode opSet :: OpCode opAdd :: OpCode opReplace :: OpCode opDelete :: OpCode opIncrement :: OpCode opDecrement :: OpCode opQuit :: OpCode opFlush :: OpCode opGetQ :: OpCode opNoOp :: OpCode opVersion :: OpCode opGetK :: OpCode opGetKQ :: OpCode opAppend :: OpCode opPrepend :: OpCode opStat :: OpCode opSetQ :: OpCode opAddQ :: OpCode opReplaceQ :: OpCode opDeleteQ :: OpCode opIncrementQ :: OpCode opDecrementQ :: OpCode opQuitQ :: OpCode opFlushQ :: OpCode opAppendQ :: OpCode opPrependQ :: OpCode opVerbosity :: OpCode opTouch :: OpCode opGAT :: OpCode opGATQ :: OpCode opSaslListMechs :: OpCode opSaslAuth :: OpCode opSaslStep :: OpCode opRGet :: OpCode opRSet :: OpCode opRSetQ :: OpCode opRAppend :: OpCode opRAppendQ :: OpCode opRPrepend :: OpCode opRPrependQ :: OpCode opRDelete :: OpCode opRDeleteQ :: OpCode opRIncr :: OpCode opRIncrQ :: OpCode opRDecr :: OpCode opRDecrQ :: OpCode opSetVBucket :: OpCode opGetVBucket :: OpCode opDelVBucket :: OpCode opTAPConnect :: OpCode opTAPMutation :: OpCode opTAPDelete :: OpCode opTAPFlush :: OpCode opTAPOpaque :: OpCode opTAPVBucketSet :: OpCode opTAPCheckpointStart :: OpCode opTAPCheckpointEnd :: OpCode instance Storable OpCode 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.Internal data Connection Connection :: (MVar Handle) -> Connection ConnectionPool :: (Pool Handle) -> Connection withConnection :: ConnectInfo -> (Connection -> IO a) -> IO a connect :: ConnectInfo -> IO Connection connect' :: ConnectInfo -> IO Handle close :: Connection -> IO () useConnection :: (Handle -> IO a) -> Connection -> IO a pokeWord8 :: Ptr a -> Word8 -> IO () pokeWord16be :: Ptr a -> Word16 -> IO () pokeWord32be :: Ptr a -> Word32 -> IO () pokeWord64be :: Ptr a -> Word64 -> IO () peekWord8 :: Ptr a -> IO Word8 peekWord16be :: Ptr a -> IO Word16 peekWord32be :: Ptr a -> IO Word32 peekWord64be :: Ptr a -> IO Word64 pokeByteString :: Ptr a -> ByteString -> IO () pokeLazyByteString :: Ptr a -> ByteString -> IO () data Header data Request mallocRequest :: OpCode -> Key -> Word8 -> (Ptr Request -> IO ()) -> Int -> (Ptr Request -> IO ()) -> Word32 -> CAS -> IO (Ptr Request) sendRequest :: OpCode -> Key -> Word8 -> (Ptr Request -> IO ()) -> Int -> (Ptr Request -> IO ()) -> Word32 -> CAS -> Handle -> IO () type Failure a = Word16 -> ByteString -> IO a peekResponse :: (Ptr Header -> IO a) -> Failure a -> Handle -> IO a withRequest :: OpCode -> Key -> Word8 -> (Ptr Request -> IO ()) -> Int -> (Ptr Request -> IO ()) -> CAS -> (Handle -> Ptr Header -> IO a) -> Failure a -> Handle -> IO a getExtraLength :: Ptr Header -> IO Word8 getKeyLength :: Ptr Header -> IO Word16 getTotalLength :: Ptr Header -> IO Word32 getCAS :: Ptr Header -> IO CAS getOpaque :: Ptr Header -> IO Word32 nop :: Ptr Request -> IO () inspectResponse :: Handle -> Ptr Header -> IO (ByteString, ByteString, ByteString) getSuccessCallback :: (Flags -> Value -> IO a) -> Handle -> Ptr Header -> IO a get :: (Flags -> Value -> IO a) -> Failure a -> Key -> Handle -> IO a getWithCAS :: (CAS -> Flags -> Value -> IO a) -> Failure a -> Key -> Handle -> IO a setAddReplace :: IO a -> Failure a -> OpCode -> CAS -> Key -> Value -> Flags -> Expiry -> Handle -> IO a setAddReplaceWithCAS :: (CAS -> IO a) -> Failure a -> OpCode -> CAS -> Key -> Value -> Flags -> Expiry -> Handle -> IO a delete :: IO a -> Failure a -> CAS -> Key -> Handle -> IO a incrDecr :: (Word64 -> IO a) -> Failure a -> OpCode -> CAS -> Key -> Delta -> Initial -> Expiry -> Handle -> IO a quit :: Handle -> IO () flushAll :: IO a -> Failure a -> Handle -> IO a flushWithin :: IO a -> Failure a -> Expiry -> Handle -> IO a noOp :: IO a -> Failure a -> Handle -> IO a version :: (ByteString -> IO a) -> Failure a -> Handle -> IO a appendPrepend :: IO a -> Failure a -> OpCode -> CAS -> Key -> Value -> Handle -> IO a stats :: Handle -> IO (HashMap ByteString ByteString) verbosity :: IO a -> Failure a -> Word32 -> Handle -> IO a touch :: (Flags -> Value -> IO a) -> Failure a -> OpCode -> Key -> Expiry -> Handle -> IO a saslListMechs :: (ByteString -> IO a) -> Failure a -> Handle -> IO a auth :: Auth -> (ByteString -> IO a) -> Failure a -> Handle -> IO a 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