riak-1.1.2.5: A Haskell client for the Riak decentralized data store

Copyright(c) 2011 MailRank Inc.
LicenseApache
MaintainerMark Hibberd <mark@hibberd.id.au>, Nathan Hunter <nhunter@janrain.com>
Stabilityexperimental
Portabilityportable
Safe HaskellNone
LanguageHaskell98

Network.Riak.Types.Internal

Contents

Description

Basic types.

Synopsis

Client management

type ClientID = ByteString #

A client identifier. This is used by the Riak cluster when logging vector clock changes, and should be unique for each client.

data Client #

Constructors

Client 

Fields

Instances

Eq Client # 

Methods

(==) :: Client -> Client -> Bool #

(/=) :: Client -> Client -> Bool #

Show Client # 

Connection management

data Connection #

A connection to a Riak server.

Constructors

Connection 

Fields

Errors

netError :: String -> String -> String -> a #

Data types

type Bucket = ByteString #

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 #

Bucket types is a riak >= 2.0 feature allowing groups of buckets to share configuration details

type Key = ByteString #

Keys are unique object identifiers in Riak and are scoped within buckets.

type Index = ByteString #

Name of a secondary index

type Schema = ByteString #

Name of an index schema

data IndexQuery #

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.

type Tag = ByteString #

An application-specific identifier for a link. See http://wiki.basho.com/Links.html for details.

type SearchQuery = ByteString #

Search request

type Score = Double #

Search result score

type IndexInfo = YzIndex #

Search index info

newtype VClock #

A wrapper that keeps Riak vector clocks opaque.

Constructors

VClock 

Fields

Instances

Eq VClock # 

Methods

(==) :: VClock -> VClock -> Bool #

(/=) :: VClock -> VClock -> Bool #

Show VClock # 

data Job #

A specification of a MapReduce job. http://wiki.basho.com/MapReduce.html.

Instances

Eq Job # 

Methods

(==) :: Job -> Job -> Bool #

(/=) :: Job -> Job -> Bool #

Show Job # 

Methods

showsPrec :: Int -> Job -> ShowS #

show :: Job -> String #

showList :: [Job] -> ShowS #

type Timeout = Word32 #

Timeout in milliseconds

Quorum management

data Quorum #

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).

Constructors

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.

type DW = Quorum #

Durable write quorum. How many replicas to commit to durable storage before returning a successful response.

type R = Quorum #

Read quorum. How many replicas need to agree when retrieving a value.

type RW = Quorum #

Read/write quorum. How many replicas need to collaborate when deleting a value.

type W = Quorum #

Write quorum. How many replicas to write to before returning a successful response.

Message identification

class (Tagged msg, ReflectDescriptor msg, Show msg, Wire msg) => Request msg where #

A message representing a request from client to server.

Minimal complete definition

expectedResponse

Methods

expectedResponse :: msg -> MessageTag #

class (Tagged msg, ReflectDescriptor msg, Show msg, Wire msg) => Response msg #

A message representing a response from server to client.

class (Request req, Response resp) => Exchange req resp | req -> resp #

data MessageTag #

List of (known to us) inbound or outbound message identifiers.

Instances

Eq MessageTag # 
Show MessageTag # 
Generic MessageTag # 

Associated Types

type Rep MessageTag :: * -> * #

Hashable MessageTag # 
Tagged MessageTag # 
type Rep MessageTag # 
type Rep MessageTag = D1 * (MetaData "MessageTag" "Network.Riak.Types.Internal" "riak-1.1.2.5-JQlatLoLhbE8vKRpg9HrO2" False) ((:+:) * ((:+:) * ((:+:) * ((:+:) * ((:+:) * (C1 * (MetaCons "ErrorResponse" PrefixI False) (U1 *)) (C1 * (MetaCons "PingRequest" PrefixI False) (U1 *))) ((:+:) * (C1 * (MetaCons "PingResponse" PrefixI False) (U1 *)) (C1 * (MetaCons "GetClientIDRequest" PrefixI False) (U1 *)))) ((:+:) * ((:+:) * (C1 * (MetaCons "GetClientIDResponse" PrefixI False) (U1 *)) (C1 * (MetaCons "SetClientIDRequest" PrefixI False) (U1 *))) ((:+:) * (C1 * (MetaCons "SetClientIDResponse" PrefixI False) (U1 *)) ((:+:) * (C1 * (MetaCons "GetServerInfoRequest" PrefixI False) (U1 *)) (C1 * (MetaCons "GetServerInfoResponse" PrefixI False) (U1 *)))))) ((:+:) * ((:+:) * ((:+:) * (C1 * (MetaCons "GetRequest" PrefixI False) (U1 *)) (C1 * (MetaCons "GetResponse" PrefixI False) (U1 *))) ((:+:) * (C1 * (MetaCons "PutRequest" PrefixI False) (U1 *)) ((:+:) * (C1 * (MetaCons "PutResponse" PrefixI False) (U1 *)) (C1 * (MetaCons "DeleteRequest" PrefixI False) (U1 *))))) ((:+:) * ((:+:) * (C1 * (MetaCons "DeleteResponse" PrefixI False) (U1 *)) (C1 * (MetaCons "ListBucketsRequest" PrefixI False) (U1 *))) ((:+:) * (C1 * (MetaCons "ListBucketsResponse" PrefixI False) (U1 *)) ((:+:) * (C1 * (MetaCons "ListKeysRequest" PrefixI False) (U1 *)) (C1 * (MetaCons "ListKeysResponse" PrefixI False) (U1 *))))))) ((:+:) * ((:+:) * ((:+:) * ((:+:) * (C1 * (MetaCons "GetBucketRequest" PrefixI False) (U1 *)) (C1 * (MetaCons "GetBucketResponse" PrefixI False) (U1 *))) ((:+:) * (C1 * (MetaCons "SetBucketRequest" PrefixI False) (U1 *)) (C1 * (MetaCons "SetBucketResponse" PrefixI False) (U1 *)))) ((:+:) * ((:+:) * (C1 * (MetaCons "GetBucketTypeRequest" PrefixI False) (U1 *)) (C1 * (MetaCons "MapReduceRequest" PrefixI False) (U1 *))) ((:+:) * (C1 * (MetaCons "MapReduceResponse" PrefixI False) (U1 *)) ((:+:) * (C1 * (MetaCons "IndexRequest" PrefixI False) (U1 *)) (C1 * (MetaCons "IndexResponse" PrefixI False) (U1 *)))))) ((:+:) * ((:+:) * ((:+:) * (C1 * (MetaCons "DtFetchRequest" PrefixI False) (U1 *)) (C1 * (MetaCons "DtFetchResponse" PrefixI False) (U1 *))) ((:+:) * (C1 * (MetaCons "DtUpdateRequest" PrefixI False) (U1 *)) ((:+:) * (C1 * (MetaCons "DtUpdateResponse" PrefixI False) (U1 *)) (C1 * (MetaCons "SearchQueryRequest" PrefixI False) (U1 *))))) ((:+:) * ((:+:) * (C1 * (MetaCons "SearchQueryResponse" PrefixI False) (U1 *)) (C1 * (MetaCons "YokozunaIndexGetRequest" PrefixI False) (U1 *))) ((:+:) * (C1 * (MetaCons "YokozunaIndexGetResponse" PrefixI False) (U1 *)) ((:+:) * (C1 * (MetaCons "YokozunaIndexPutRequest" PrefixI False) (U1 *)) (C1 * (MetaCons "YokozunaIndexDeleteRequest" PrefixI False) (U1 *))))))))

class Tagged msg where #

Messages are tagged.

Minimal complete definition

messageTag

Methods

messageTag #

Arguments

:: msg 
-> MessageTag

Retrieve a message's tag.