Copyright | (c) 2011 MailRank Inc. |
---|---|
License | Apache |
Maintainer | Mark Hibberd <mark@hibberd.id.au>, Nathan Hunter <nhunter@janrain.com> |
Stability | experimental |
Portability | portable |
Safe Haskell | None |
Language | Haskell2010 |
Basic types.
Synopsis
- type ClientID = ByteString
- data Client = Client {}
- data Connection = Connection {}
- data RiakException
- netError :: String -> String -> String -> a
- typeError :: String -> String -> String -> a
- unexError :: String -> String -> String -> a
- type Bucket = ByteString
- type BucketType = ByteString
- type Key = ByteString
- type Index = ByteString
- type Schema = ByteString
- data IndexQuery
- data IndexValue
- type Tag = ByteString
- type SearchQuery = ByteString
- data SearchResult = SearchResult {
- docs :: ![[(ByteString, Maybe ByteString)]]
- maxScore :: !(Maybe Float)
- numFound :: !(Maybe Word32)
- type Score = Double
- type IndexInfo = RpbYokozunaIndex
- newtype VClock = VClock {}
- data Job
- type N = Word32
- type Timeout = Word32
- data Quorum
- type DW = Quorum
- type R = Quorum
- type RW = Quorum
- type W = Quorum
- fromQuorum :: Quorum -> Maybe Word32
- toQuorum :: Word32 -> Maybe Quorum
- class (Message msg, Show msg, Tagged msg) => Request msg where
- expectedResponse :: msg -> MessageTag
- class (Message msg, Show msg, Tagged msg) => Response msg
- class (Request req, Response resp) => Exchange req resp | req -> resp
- data MessageTag
- = ErrorResponse
- | PingRequest
- | PingResponse
- | GetClientIDRequest
- | GetClientIDResponse
- | SetClientIDRequest
- | SetClientIDResponse
- | GetServerInfoRequest
- | GetServerInfoResponse
- | GetRequest
- | GetResponse
- | PutRequest
- | PutResponse
- | DeleteRequest
- | DeleteResponse
- | ListBucketsRequest
- | ListBucketsResponse
- | ListKeysRequest
- | ListKeysResponse
- | GetBucketRequest
- | GetBucketResponse
- | SetBucketRequest
- | SetBucketResponse
- | GetBucketTypeRequest
- | MapReduceRequest
- | MapReduceResponse
- | IndexRequest
- | IndexResponse
- | DtFetchRequest
- | DtFetchResponse
- | DtUpdateRequest
- | DtUpdateResponse
- | SearchQueryRequest
- | SearchQueryResponse
- | YokozunaIndexGetRequest
- | YokozunaIndexGetResponse
- | YokozunaIndexPutRequest
- | YokozunaIndexDeleteRequest
- class Tagged msg where
- messageTag :: msg -> MessageTag
Client management
type ClientID = ByteString Source #
A client identifier. This is used by the Riak cluster when logging vector clock changes, and should be unique for each client.
Connection management
data Connection Source #
A connection to a Riak server.
Connection | |
|
Instances
Eq Connection Source # | |
Defined in Network.Riak.Types.Internal (==) :: Connection -> Connection -> Bool # (/=) :: Connection -> Connection -> Bool # | |
Show Connection Source # | |
Defined in Network.Riak.Types.Internal showsPrec :: Int -> Connection -> ShowS # show :: Connection -> String # showList :: [Connection] -> ShowS # |
Errors
data RiakException Source #
The main Riak exception type.
Instances
Eq RiakException Source # | |
Defined in Network.Riak.Types.Internal (==) :: RiakException -> RiakException -> Bool # (/=) :: RiakException -> RiakException -> Bool # | |
Show RiakException Source # | |
Defined in Network.Riak.Types.Internal showsPrec :: Int -> RiakException -> ShowS # show :: RiakException -> String # showList :: [RiakException] -> ShowS # | |
Exception RiakException Source # | |
Defined in Network.Riak.Types.Internal |
Data types
type Bucket = ByteString Source #
A Bucket is a container and keyspace for data stored in Riak, with a set of common properties for its contents (the number of replicas, for instance).
type BucketType = ByteString Source #
Bucket types is a riak >= 2.0 feature allowing groups of buckets to share configuration details
type Key = ByteString Source #
Keys are unique object identifiers in Riak and are scoped within buckets.
type Index = ByteString Source #
Name of a secondary index
type Schema = ByteString Source #
Name of an index schema
data IndexQuery Source #
Index query. Can be exact or range, int or bin. Index name should not contain the "_bin" or "_int" part, since it's determined from data constructor.
IndexQueryExactInt !Index !Int | |
IndexQueryExactBin !Index !ByteString | |
IndexQueryRangeInt !Index !Int !Int | |
IndexQueryRangeBin !Index !ByteString !ByteString |
Instances
Eq IndexQuery Source # | |
Defined in Network.Riak.Types.Internal (==) :: IndexQuery -> IndexQuery -> Bool # (/=) :: IndexQuery -> IndexQuery -> Bool # | |
Show IndexQuery Source # | |
Defined in Network.Riak.Types.Internal showsPrec :: Int -> IndexQuery -> ShowS # show :: IndexQuery -> String # showList :: [IndexQuery] -> ShowS # |
data IndexValue Source #
Instances
Eq IndexValue Source # | |
Defined in Network.Riak.Types.Internal (==) :: IndexValue -> IndexValue -> Bool # (/=) :: IndexValue -> IndexValue -> Bool # | |
Show IndexValue Source # | |
Defined in Network.Riak.Types.Internal showsPrec :: Int -> IndexValue -> ShowS # show :: IndexValue -> String # showList :: [IndexValue] -> ShowS # |
type Tag = ByteString Source #
An application-specific identifier for a link. See http://wiki.basho.com/Links.html for details.
type SearchQuery = ByteString Source #
Search request
data SearchResult Source #
Solr search result
SearchResult | |
|
Instances
Eq SearchResult Source # | |
Defined in Network.Riak.Types.Internal (==) :: SearchResult -> SearchResult -> Bool # (/=) :: SearchResult -> SearchResult -> Bool # | |
Ord SearchResult Source # | |
Defined in Network.Riak.Types.Internal compare :: SearchResult -> SearchResult -> Ordering # (<) :: SearchResult -> SearchResult -> Bool # (<=) :: SearchResult -> SearchResult -> Bool # (>) :: SearchResult -> SearchResult -> Bool # (>=) :: SearchResult -> SearchResult -> Bool # max :: SearchResult -> SearchResult -> SearchResult # min :: SearchResult -> SearchResult -> SearchResult # | |
Show SearchResult Source # | |
Defined in Network.Riak.Types.Internal showsPrec :: Int -> SearchResult -> ShowS # show :: SearchResult -> String # showList :: [SearchResult] -> ShowS # |
type IndexInfo = RpbYokozunaIndex Source #
Search index info
A wrapper that keeps Riak vector clocks opaque.
VClock | |
|
A specification of a MapReduce job. http://wiki.basho.com/MapReduce.html.
Quorum management
A read/write quorum. The quantity of replicas that must respond
to a read or write request before it is considered successful. This
is defined as a bucket property or as one of the relevant
parameters to a single request (R
,W
,DW
,RW
).
Default | Use the default quorum settings for the bucket. |
One | Success after one server has responded. |
Quorum | Success after a quorum of servers has responded. |
All | Success after all servers have responded. |
Durable write quorum. How many replicas to commit to durable storage before returning a successful response.
Read/write quorum. How many replicas need to collaborate when deleting a value.
Write quorum. How many replicas to write to before returning a successful response.
Message identification
class (Message msg, Show msg, Tagged msg) => Request msg where Source #
A message representing a request from client to server.
expectedResponse :: msg -> MessageTag Source #
Instances
class (Message msg, Show msg, Tagged msg) => Response msg Source #
A message representing a response from server to client.
Instances
Response DtFetchResp Source # | |
Defined in Network.Riak.Tag | |
Response DtUpdateResp Source # | |
Defined in Network.Riak.Tag | |
Response RpbErrorResp Source # | |
Defined in Network.Riak.Tag | |
Response RpbGetBucketResp Source # | |
Defined in Network.Riak.Tag | |
Response RpbGetClientIdResp Source # | |
Defined in Network.Riak.Tag | |
Response RpbGetResp Source # | |
Defined in Network.Riak.Tag | |
Response RpbGetServerInfoResp Source # | |
Defined in Network.Riak.Tag | |
Response RpbIndexResp Source # | |
Defined in Network.Riak.Tag | |
Response RpbListBucketsResp Source # | |
Defined in Network.Riak.Tag | |
Response RpbListKeysResp Source # | |
Defined in Network.Riak.Tag | |
Response RpbMapRedResp Source # | |
Defined in Network.Riak.Tag | |
Response RpbPutResp Source # | |
Defined in Network.Riak.Tag | |
Response RpbSearchQueryResp Source # | |
Defined in Network.Riak.Tag | |
Response RpbYokozunaIndexGetResp Source # | |
Defined in Network.Riak.Tag |
class (Request req, Response resp) => Exchange req resp | req -> resp Source #
Instances
data MessageTag Source #
List of (known to us) inbound or outbound message identifiers.
Instances
Eq MessageTag Source # | |
Defined in Network.Riak.Types.Internal (==) :: MessageTag -> MessageTag -> Bool # (/=) :: MessageTag -> MessageTag -> Bool # | |
Show MessageTag Source # | |
Defined in Network.Riak.Types.Internal showsPrec :: Int -> MessageTag -> ShowS # show :: MessageTag -> String # showList :: [MessageTag] -> ShowS # | |
Generic MessageTag Source # | |
Defined in Network.Riak.Types.Internal type Rep MessageTag :: Type -> Type # from :: MessageTag -> Rep MessageTag x # to :: Rep MessageTag x -> MessageTag # | |
Hashable MessageTag Source # | |
Defined in Network.Riak.Types.Internal hashWithSalt :: Int -> MessageTag -> Int # hash :: MessageTag -> Int # | |
Tagged MessageTag Source # | |
Defined in Network.Riak.Types.Internal messageTag :: MessageTag -> MessageTag Source # | |
type Rep MessageTag Source # | |
Defined in Network.Riak.Types.Internal type Rep MessageTag = D1 ('MetaData "MessageTag" "Network.Riak.Types.Internal" "riak-1.2.0.0-CYLrRp5TJSeH9YOHpDuG7W" 'False) (((((C1 ('MetaCons "ErrorResponse" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "PingRequest" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "PingResponse" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "GetClientIDRequest" 'PrefixI 'False) (U1 :: Type -> Type))) :+: ((C1 ('MetaCons "GetClientIDResponse" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "SetClientIDRequest" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "SetClientIDResponse" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "GetServerInfoRequest" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "GetServerInfoResponse" 'PrefixI 'False) (U1 :: Type -> Type))))) :+: (((C1 ('MetaCons "GetRequest" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "GetResponse" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "PutRequest" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "PutResponse" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "DeleteRequest" 'PrefixI 'False) (U1 :: Type -> Type)))) :+: ((C1 ('MetaCons "DeleteResponse" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "ListBucketsRequest" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "ListBucketsResponse" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "ListKeysRequest" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "ListKeysResponse" 'PrefixI 'False) (U1 :: Type -> Type)))))) :+: ((((C1 ('MetaCons "GetBucketRequest" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "GetBucketResponse" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "SetBucketRequest" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "SetBucketResponse" 'PrefixI 'False) (U1 :: Type -> Type))) :+: ((C1 ('MetaCons "GetBucketTypeRequest" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "MapReduceRequest" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "MapReduceResponse" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "IndexRequest" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "IndexResponse" 'PrefixI 'False) (U1 :: Type -> Type))))) :+: (((C1 ('MetaCons "DtFetchRequest" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "DtFetchResponse" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "DtUpdateRequest" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "DtUpdateResponse" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "SearchQueryRequest" 'PrefixI 'False) (U1 :: Type -> Type)))) :+: ((C1 ('MetaCons "SearchQueryResponse" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "YokozunaIndexGetRequest" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "YokozunaIndexGetResponse" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "YokozunaIndexPutRequest" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "YokozunaIndexDeleteRequest" 'PrefixI 'False) (U1 :: Type -> Type))))))) |
class Tagged msg where Source #
Messages are tagged.
:: msg | |
-> MessageTag | Retrieve a message's tag. |