ekg-0.3.1.3: Remote monitoring of processes

Safe Haskell | Safe-Inferred

System.Remote.Gauge

Description

This module defines a type for mutable, integer-valued gauges. Gauges are variable values and can be used to track e.g. the current number of concurrent connections. All operations on gauges are thread-safe.

Synopsis

- data Gauge
- inc :: Gauge -> IO ()
- dec :: Gauge -> IO ()
- add :: Gauge -> Int -> IO ()
- subtract :: Gauge -> Int -> IO ()
- set :: Gauge -> Int -> IO ()
- modify :: (Int -> Int) -> Gauge -> IO ()

# Documentation

data Gauge Source

A mutable, integer-valued gauge.

inc :: Gauge -> IO ()Source

Increase the gauge by one.

dec :: Gauge -> IO ()Source

Decrease the gauge by one.

add :: Gauge -> Int -> IO ()Source

Increase the gauge by the given amount.

subtract :: Gauge -> Int -> IO ()Source

Decrease the gauge by the given amount.

set :: Gauge -> Int -> IO ()Source

Set the gauge to the given value.

modify :: (Int -> Int) -> Gauge -> IO ()Source

Set the gauge to the result of applying the given function to the value.