prodapi-0.1.0.0: Some curated and opinionated packages for building Haskell services.
Safe HaskellSafe-Inferred
LanguageHaskell2010

Prod.Watchdog

Synopsis

Documentation

data Track r Source #

Instances

Instances details
Show r => Show (Track r) Source # 
Instance details

Defined in Prod.Watchdog

Methods

showsPrec :: Int -> Track r -> ShowS #

show :: Track r -> String #

showList :: [Track r] -> ShowS #

data WatchdogResult a Source #

Constructors

Skipped 
Success a 
Failed 

Instances

Instances details
Show a => Show (WatchdogResult a) Source # 
Instance details

Defined in Prod.Watchdog

Eq a => Eq (WatchdogResult a) Source # 
Instance details

Defined in Prod.Watchdog

Ord a => Ord (WatchdogResult a) Source # 
Instance details

Defined in Prod.Watchdog

watchdog :: Label label => Vector label Counter -> Tracer IO (Track a) -> (WatchdogResult a -> label) -> MicroSeconds Int -> IO (WatchdogResult a) -> IO (Watchdog a) Source #

basicWatchdog :: Vector Label1 Counter -> Tracer IO (Track a) -> MicroSeconds Int -> IO (WatchdogResult a) -> IO (Watchdog a) Source #

Basic watchdog with a vector metric. The input vector label is set with success|failed|skipped depending on the WatchdogResult.

data FileTouchTrack r Source #

Constructors

FileTouchTrack FilePath (Track r) 

Instances

Instances details
Show r => Show (FileTouchTrack r) Source # 
Instance details

Defined in Prod.Watchdog

fileTouchWatchdog :: FilePath -> Tracer IO (FileTouchTrack UTCTime) -> MicroSeconds Int -> IO (Watchdog UTCTime) Source #

Touches a file periodically, using setModificationTime. If the file does not exists when the watchdog is initialized, then it is created empty.