influxdb-1.0.0: Haskell client library for InfluxDB

Safe HaskellNone
LanguageHaskell2010

Database.InfluxDB.Write

Contents

Synopsis

Writers

write :: Timestamp time => WriteParams -> Line time -> IO () Source #

Write a Line

writeBatch :: (Timestamp time, Traversable f) => WriteParams -> f (Line time) -> IO () Source #

Write Lines in a batch

This is more efficient than write.

Writer parameters

data WriteParams Source #

The full set of parameters for the HTTP writer.

Instances

HasCredentials WriteParams Source # 
HasManager WriteParams Source #
>>> let p = writeParams "foo"
>>> p & manager .~ Left HC.defaultManagerSettings
HasDatabase WriteParams Source #
>>> let p = writeParams "foo"
>>> p ^. database
"foo"
HasServer WriteParams Source #
>>> let p = writeParams "foo"
>>> p ^. server.host
"localhost"
HasPrecision WriteRequest WriteParams Source #
>>> let p = writeParams "foo"
>>> p ^. precision
Nanosecond

retentionPolicy :: Lens' WriteParams (Maybe Key) Source #

Target retention policy for the write.

InfluxDB writes to the default retention policy if this parameter is set to Nothing.

>>> let p = writeParams "foo"
>>> let p' = p & retentionPolicy .~ Just "two_hours"
>>> p' ^. retentionPolicy
Just "two_hours"

manager :: HasManager a => Lens' a (Either ManagerSettings Manager) Source #

HTTP manager settings or a manager itself.

If it's set to ManagerSettings, the library will create a Manager from the settings for you.