language-puppet-1.4.5: Tools to parse and evaluate the Puppet DSL.

Safe HaskellNone
LanguageHaskell98

Hiera.Server

Description

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

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.

Constructors

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 # 
Instance details

Defined in Hiera.Server

type HieraQueryFunc m Source #

Arguments

 = Container PValue

Scope: all variables that Hiera can interpolate (the top level ones are prefixed with '::')

-> Text

The query

-> HieraQueryType 
-> ExceptT PrettyError m (Maybe PValue) 

The type of the Hiera API function associated to given hierarchy.