Safe Haskell | None |
---|---|
Language | Haskell2010 |
This module contains data structures to describe the "warming-up" of componnts in order to ensure that they are properly configured:
- createWarmup creates a warmup from an action
returning a
Result
- warmupOf takes a component name and unit action then just checks that the action executes without exception
Synopsis
- newtype Warmup = Warmup {}
- warmupOf :: Typeable a => a -> IO () -> Warmup
- createWarmup :: IO Result -> Warmup
- noWarmup :: Warmup
- declareWarmup :: Typeable a => a -> Warmup
- data Result
- isSuccess :: Result -> Bool
- ok :: Text -> Result
- failed :: Text -> Result
- messages :: Result -> [Text]
- runWarmup :: Warmup -> IO Result
- runBoth :: IO Result -> IO Result -> IO Result
Documentation
Creation functions
warmupOf :: Typeable a => a -> IO () -> Warmup Source #
Create a warmup action for a given component The type of the component is used as the description for the action to execute
declareWarmup :: Typeable a => a -> Warmup Source #
Create a Warmup
with no action but just the type of a component
Result of a Warmup