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

Safe HaskellNone

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 :: FilePath -> IO (Either String HieraQueryFunc)

The only method you'll ever need. It runs a Hiera server and gives you a querying function. The Nil output is explicitely given as a Maybe type.

dummyHiera :: HieraQueryFunc

A dummy hiera function that will be used when hiera is not detected

type HieraQueryFunc = Container ScopeInformation -> Text -> HieraQueryType -> IO (Either Doc (Pair InterpreterWriter (Maybe PValue)))

The type of the Hiera API function