| Safe Haskell | None |
|---|---|
| Language | Haskell2010 |
Network.Carbon.Plaintext
Synopsis
- data Connection = Connection {}
- connect :: SockAddr -> IO Connection
- disconnect :: Connection -> IO ()
- sendMetrics :: Connection -> Vector Metric -> IO ()
- sendMetric :: Connection -> Text -> Double -> UTCTime -> IO ()
- data Metric = Metric {
- metricPath :: !Text
- metricValue :: !Double
- metricTimeStamp :: !UTCTime
- encodeMetric :: Metric -> Builder
Interacting with Carbon
Connections
data Connection Source #
Low-level representation of a Carbon connection. It's suggested that you
construct this via connect. It is henceforth assumed that
getPeerName will return something useful, which usually means
connectionSocket should have been connected at least once.
Constructors
| Connection | |
Fields
| |
Instances
| Eq Connection Source # | |
Defined in Network.Carbon.Plaintext | |
| Show Connection Source # | |
Defined in Network.Carbon.Plaintext Methods showsPrec :: Int -> Connection -> ShowS # show :: Connection -> String # showList :: [Connection] -> ShowS # | |
disconnect :: Connection -> IO () Source #
Disconnect from Carbon. Note that it's still valid to sendMetrics to this
Connection, and it will result in a reconnection.
Metrics
sendMetrics :: Connection -> Vector Metric -> IO () Source #
Send a collection of metrics to Carbon.
sendMetric :: Connection -> Text -> Double -> UTCTime -> IO () Source #
Send a single metric.
A single data point. A metric has a path that names it, a value, and the time the metric was sampled.
Constructors
| Metric | |
Fields
| |