influxdb-0.5.1: Haskell client library for InfluxDB

Safe HaskellNone

Database.InfluxDB.Types

Contents

Synopsis

Series, columns and data points

data Series Source

A series consists of name, columns and points. The columns and points are expressed in a separate type SeriesData.

Constructors

Series 

Fields

seriesName :: !Text

Series name

seriesData :: !SeriesData

Columns and data points in the series

seriesColumns :: Series -> Vector ColumnSource

Convenient accessor for columns.

seriesPoints :: Series -> [Vector Value]Source

Convenient accessor for points.

data Value Source

An InfluxDB value represented as a Haskell value.

Constructors

Int !Int64 
Float !Double 
String !Text 
Bool !Bool 
Null 

Data types for HTTP API

data Credentials Source

User credentials.

Constructors

Credentials 

Fields

credsUser :: !Text
 
credsPassword :: !Text
 

Instances

data Server Source

Server location.

Constructors

Server 

Fields

serverHost :: !Text

Hostname or IP address

serverPort :: !Int
 
serverSsl :: !Bool

SSL is enabled or not in the server side

Instances

newtype Database Source

Constructors

Database 

Fields

databaseName :: Text
 

data User Source

User

Constructors

User 

Fields

userName :: Text
 
userIsAdmin :: Bool
 

Instances

newtype Admin Source

Administrator

Constructors

Admin 

Fields

adminName :: Text
 

Instances

newtype Ping Source

Constructors

Ping 

Fields

pingStatus :: Text
 

Instances

Server pool

data ServerPool Source

Non-empty set of server locations. The active server will always be used until any HTTP communications fail.

newServerPool :: Server -> [Server] -> IO (IORef ServerPool)Source

Create a non-empty server pool. You must specify at least one server location to create a pool.

activeServer :: IORef ServerPool -> IO ServerSource

Get a server from the pool.

failover :: IORef ServerPool -> IO ()Source

Move the current server to the backup pool and pick one of the backup server as the new active server. Currently the scheduler works in round-robin fashion.

Exceptions