network-metrics-0.2.0: Send metrics to Ganglia, Graphite, and statsd.

Portabilitynon-portable (GHC extensions)
Stabilityexperimental
MaintainerBrendan Hay <brendan@soundcloud.com>
Safe HaskellSafe-Infered

Network.Metric.Sink.SinkHandle

Contents

Description

 

Synopsis

Exported Types

data SinkHandle Source

A generic sink handle

Constructors

SinkHandle Host (String -> IO ()) 

Instances

Sink Functions

open :: Host -> HostName -> PortNumber -> IO AnySinkSource

Open a new sink to stdout, conforming to the interface in Metric.hs . If you want to create a sink to a given handle fn, use the exported SinkHandle constructor

class Sink a whereSource

Sink resource to write metrics to

Methods

push :: Measurable b => a -> b -> IO ()Source

Write a metric to the sink.

close :: a -> IO ()Source

Close the sink - subsequent writes will throw an error.

Instances

Sink AnySink

Existential sink instance

Sink Ganglia 
Sink Graphite 
Sink Statsd 
Sink SinkHandle 

Re-exports

type Group = ByteStringSource

Metric group

type Bucket = ByteStringSource

Metric bucket