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 | Haskell98 |
Basic types.
- type ClientID = ByteString
- data Client = Client {}
- data Connection = Connection {
- connSock :: Socket
- connClient :: Client
- connBuffer :: IORef ByteString
- 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
- data IndexQuery
- data IndexValue
- type Tag = ByteString
- type SearchQuery = ByteString
- data SearchResult = SearchResult {
- bucketType :: BucketType
- bucket :: Bucket
- key :: Key
- score :: Maybe Score
- type IndexInfo = YzIndex
- newtype VClock = VClock {}
- data Job
- data Quorum
- type DW = Quorum
- type R = Quorum
- type RW = Quorum
- type W = Quorum
- fromQuorum :: Quorum -> Maybe Word32
- toQuorum :: Word32 -> Maybe Quorum
- class (Tagged msg, ReflectDescriptor msg, Show msg, Wire msg) => Request msg where
- expectedResponse :: msg -> MessageTag
- class (Tagged msg, ReflectDescriptor msg, Show msg, Wire 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
- 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 | |
|
Errors
data RiakException Source
The main Riak exception type.
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
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.
data IndexValue Source
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 | |
|
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
).
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.
fromQuorum :: Quorum -> Maybe Word32 Source
Message identification
class (Tagged msg, ReflectDescriptor msg, Show msg, Wire msg) => Request msg where Source
A message representing a request from client to server.
expectedResponse :: msg -> MessageTag Source
Request GetClientIDRequest | |
Request GetServerInfoRequest | |
Request ListBucketsRequest | |
Request MapReduceRequest | |
Request PingRequest | |
Request DeleteRequest | |
Request GetBucketRequest | |
Request GetRequest | |
Request IndexRequest | |
Request ListKeysRequest | |
Request PutRequest | |
Request SetBucketRequest | |
Request GetBucketTypeRequest | |
Request SearchQueryRequest | |
Request YzIndexGetRequest | |
Request SetClientIDRequest | |
Request DtFetchRequest | |
Request DtUpdateRequest |
class (Tagged msg, ReflectDescriptor msg, Show msg, Wire msg) => Response msg Source
A message representing a response from server to client.
Response DtFetchResponse | |
Response GetBucketResponse | |
Response GetClientIDResponse | |
Response GetResponse | |
Response ListBucketsResponse | |
Response PutResponse | |
Response SearchQueryResponse | |
Response YzIndexGetResponse | |
Response ErrorResponse | |
Response IndexResponse | |
Response ListKeysResponse | |
Response MapReduce | |
Response ServerInfo | |
Response DtUpdateResponse |
class (Request req, Response resp) => Exchange req resp | req -> resp Source
Exchange GetClientIDRequest GetClientIDResponse | |
Exchange GetServerInfoRequest ServerInfo | |
Exchange ListBucketsRequest ListBucketsResponse | |
Exchange MapReduceRequest MapReduce | |
Exchange GetBucketRequest GetBucketResponse | |
Exchange GetRequest GetResponse | |
Exchange IndexRequest IndexResponse | |
Exchange PutRequest PutResponse | |
Exchange GetBucketTypeRequest GetBucketResponse | |
Exchange SearchQueryRequest SearchQueryResponse | |
Exchange YzIndexGetRequest YzIndexGetResponse | |
Exchange DtFetchRequest DtFetchResponse | |
Exchange DtUpdateRequest DtUpdateResponse |
data MessageTag Source
List of (known to us) inbound or outbound message identifiers.
Eq MessageTag | |
Show MessageTag | |
Generic MessageTag | |
Hashable MessageTag | |
Tagged MessageTag | |
type Rep MessageTag |
Messages are tagged.
:: msg | |
-> MessageTag | Retrieve a message's tag. |
Tagged DtFetchResponse | |
Tagged MessageTag | |
Tagged GetClientIDRequest | |
Tagged GetServerInfoRequest | |
Tagged ListBucketsRequest | |
Tagged MapReduceRequest | |
Tagged PingRequest | |
Tagged DeleteRequest | |
Tagged GetBucketRequest | |
Tagged GetRequest | |
Tagged IndexRequest | |
Tagged ListKeysRequest | |
Tagged PutRequest | |
Tagged SetBucketRequest | |
Tagged GetBucketTypeRequest | |
Tagged SearchQueryRequest | |
Tagged YzIndexGetRequest | |
Tagged GetBucketResponse | |
Tagged GetClientIDResponse | |
Tagged GetResponse | |
Tagged ListBucketsResponse | |
Tagged PutResponse | |
Tagged SearchQueryResponse | |
Tagged YzIndexGetResponse | |
Tagged ErrorResponse | |
Tagged IndexResponse | |
Tagged ListKeysResponse | |
Tagged MapReduce | |
Tagged ServerInfo | |
Tagged SetClientIDRequest | |
Tagged DtFetchRequest | |
Tagged DtUpdateRequest | |
Tagged DtUpdateResponse | |
(Tagged a, Tagged b) => Tagged (Either a b) |