riak-1.0.1.1: 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 Source

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

data Client Source

Constructors

Client 

Fields

host :: HostName

Name of the server to connect to.

port :: ServiceName

Port number to connect to (default is 8087).

clientID :: ClientID

Client identifier.

Connection management

data Connection Source

A connection to a Riak server.

Constructors

Connection 

Fields

connSock :: Socket
 
connClient :: Client

The configuration we connected with.

connBuffer :: IORef ByteString

Received data that has not yet been consumed.

Errors

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.

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

Constructors

SearchResult 

Fields

bucketType :: BucketType

bucket type

bucket :: Bucket

bucket

key :: Key

key

score :: Maybe Score

score, if provided

type IndexInfo = YzIndex Source

Search index info

newtype VClock Source

A wrapper that keeps Riak vector clocks opaque.

Constructors

VClock 

Fields

fromVClock :: ByteString

Unwrap the ByteString. (This is really only useful for printing the raw vclock string.)

data Job Source

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

Instances

Quorum management

data Quorum Source

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 Source

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

type R = Quorum Source

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

type RW = Quorum Source

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

type W = Quorum Source

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 Source

A message representing a request from client to server.

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

A message representing a response from server to client.

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

class Tagged msg where Source

Messages are tagged.

Methods

messageTag Source

Arguments

:: msg 
-> MessageTag

Retrieve a message's tag.

Instances