Safe Haskell | None |
---|---|
Language | Haskell2010 |
- module Network.Monitoring.Riemann.Types
- module Data.Int
- data Client
- = UDP { }
- | TCP {
- riemannHost :: Hostname
- riemannPort :: Port
- tcpClient :: IORef TCPState
- makeUDPClient :: Hostname -> Port -> IO Client
- makeTCPClient :: Hostname -> Port -> IO Client
- isError :: MonadIO m => Client -> m Bool
- closeClient :: Client -> IO ()
- sendEventT :: Client -> Event -> ExceptT IOException IO Client
- sendEvent :: MonadIO m => Client -> Event -> m ()
Documentation
module Data.Int
UDP | |
| |
TCP | |
|
makeTCPClient :: Hostname -> Port -> IO Client Source #
Attempts to connect to given riemann server Returns an initialised TCP client that can later be used to send events to given riemann host/port. TCP Clients always try to reconnect to server when an event is sent and connection is either closed or in error.
isError :: MonadIO m => Client -> m Bool Source #
Checks whether or not a given Client
is in an error state.
closeClient :: Client -> IO () Source #
sendEventT :: Client -> Event -> ExceptT IOException IO Client Source #
Attempts to forward an event to a client. If it fails, it'll
return an IOException
in the ExceptT
, otherwise it returns the passed Client
, possibly
modified to cope for changes in state.