memcache-haskell-0.0.10.1: Memcache procotol library

Safe HaskellSafe-Inferred
LanguageHaskell98

Network.Memcache.Op

Description

For farther information, please see https://github.com/memcached/memcached/blob/master/doc/protocol.txt

  • storage - set, add, replace, append or prepend
  • retrieval - get and gets
  • deletion - delete
  • increment decrement - incr and decr
  • touch - touch
  • stats
  • other commands - flush_all, version, quit

Synopsis

Documentation

data Option Source

Constructors

Noreply 

isWriteOp :: Op -> Bool Source

true if an operation is an update command

isReadOp :: Op -> Bool Source

true if an operation is a retrieval command

isNoreplyOp :: Op -> Bool Source

true if an operation has noreply option

isStorageOp :: Op -> Bool Source

true if an operation is a storage command

toOption :: ByteString -> Maybe Option Source

parse a option string

toOptions :: [ByteString] -> Maybe [Option] Source

parse option strings

keyOf :: Op -> Maybe ByteString Source

get the key of an operation

bytesOf :: Op -> Maybe BytesT Source

get the value size of an operation

parseOp :: ByteString -> Maybe Op Source

Parse an operation.

parseOpHeader :: ByteString -> Maybe Op Source

Parse an operation but only its header.

opParser :: Parser Op Source

command parser by attoparsec

opHeaderParser :: Parser Op Source

command header parser by attoparsec

updateOpValue :: Op -> ValueT -> Op Source

update the value of an operation