Safe Haskell | None |
---|---|
Language | Haskell98 |
This module runs a Hiera server that caches Hiera data. There is a huge caveat : only the data files are watched for changes, not the main configuration file.
A minor bug is that interpolation will not work for inputs containing the % character when it isn't used for interpolation.
Synopsis
- startHiera :: String -> FilePath -> IO (HieraQueryFunc IO)
- dummyHiera :: Monad m => HieraQueryFunc m
- data HieraQueryType
- readQueryType :: Text -> Maybe HieraQueryType
- type HieraQueryFunc m = Container Text -> Text -> HieraQueryType -> m (Either PrettyError (Maybe PValue))
Documentation
startHiera :: String -> FilePath -> IO (HieraQueryFunc IO) Source #
The only method you'll ever need. It runs a Hiera server and gives you a querying function. | All IO exceptions are thrown directly including ParsingException.
dummyHiera :: Monad m => HieraQueryFunc m Source #
A dummy hiera function that will be used when hiera is not detected.
data HieraQueryType Source #
The different kind of hiera queries.
QFirst | The first match in the hierarchy is returned. |
QUnique | Combines array and scalar values to return a merged, flattened array with all duplicate removed. |
QHash | Combines the keys and values of any number of hashes to return a merged hash. | Use of an Hash to specify the merge behavior |
QDeep | |
|
Instances
Show HieraQueryType Source # | |
Defined in Hiera.Server showsPrec :: Int -> HieraQueryType -> ShowS # show :: HieraQueryType -> String # showList :: [HieraQueryType] -> ShowS # |
readQueryType :: Text -> Maybe HieraQueryType Source #
type HieraQueryFunc m Source #
= Container Text | Scope: all variables that Hiera can interpolate (the top level ones are prefixed with '::') |
-> Text | The query |
-> HieraQueryType | |
-> m (Either PrettyError (Maybe PValue)) |
The type of the Hiera API function associated to given hierarchy.