Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Synopsis
- data Host = Host {
- hostName :: HostName
- hostProperties :: [ChildProperty]
- hostInfo :: Info
- newtype Propellor p = Propellor {
- runWithHost :: RWST Host [EndAction] () IO p
- class LiftPropellor m where
- liftPropellor :: m a -> Propellor a
- data EndAction = EndAction Desc (Result -> Propellor Result)
- type Desc = String
- data Props metatypes = Props [ChildProperty]
- data ChildProperty = ChildProperty Desc (Maybe (Propellor Result)) Info [ChildProperty]
- class IsProp p where
- setDesc :: p -> Desc -> p
- getDesc :: p -> Desc
- getChildren :: p -> [ChildProperty]
- addChildren :: p -> [ChildProperty] -> p
- getInfoRecursive :: p -> Info
- getInfo :: p -> Info
- toChildProperty :: p -> ChildProperty
- getSatisfy :: p -> Maybe (Propellor Result)
- propsInfo :: Props metatypes -> Info
Documentation
Everything Propellor knows about a system: Its hostname, properties and their collected info.
Host | |
|
Instances
Show Host Source # | |
IsContainer Host Source # | |
Defined in Propellor.Container containerProperties :: Host -> [ChildProperty] Source # containerInfo :: Host -> Info Source # setContainerProperties :: Host -> [ChildProperty] -> Host Source # | |
Conductable Host Source # | |
MonadReader Host Propellor Source # | |
Conductable [Host] Source # | |
Propellor's monad provides read-only access to info about the host it's running on, and a writer to accumulate EndActions.
Instances
MonadIO Propellor Source # | |
Defined in Propellor.Types.Core | |
Applicative Propellor Source # | |
Functor Propellor Source # | |
Monad Propellor Source # | |
MonadCatch Propellor Source # | |
MonadMask Propellor Source # | |
Defined in Propellor.Types.Core | |
MonadThrow Propellor Source # | |
Defined in Propellor.Types.Core | |
LiftPropellor Propellor Source # | |
Defined in Propellor.Types.Core liftPropellor :: Propellor a -> Propellor a Source # | |
MonadReader Host Propellor Source # | |
Monoid (Propellor Result) Source # | |
Semigroup (Propellor Result) Source # | When two actions are appended together, the second action is only run if the first action does not fail. |
MonadWriter [EndAction] Propellor Source # | |
class LiftPropellor m where Source #
liftPropellor :: m a -> Propellor a Source #
Instances
LiftPropellor IO Source # | |
Defined in Propellor.Types.Core liftPropellor :: IO a -> Propellor a Source # | |
LiftPropellor Propellor Source # | |
Defined in Propellor.Types.Core liftPropellor :: Propellor a -> Propellor a Source # |
An action that Propellor runs at the end, after trying to satisfy all properties. It's passed the combined Result of the entire Propellor run.
Props is a combination of a list of properties, with their combined metatypes.
data ChildProperty Source #
Since there are many different types of Properties, they cannot be put into a list. The simplified ChildProperty can be put into a list.
Instances
Show ChildProperty Source # | |
Defined in Propellor.Types.Core showsPrec :: Int -> ChildProperty -> ShowS # show :: ChildProperty -> String # showList :: [ChildProperty] -> ShowS # | |
IsProp ChildProperty Source # | |
Defined in Propellor.Types.Core setDesc :: ChildProperty -> Desc -> ChildProperty Source # getDesc :: ChildProperty -> Desc Source # getChildren :: ChildProperty -> [ChildProperty] Source # addChildren :: ChildProperty -> [ChildProperty] -> ChildProperty Source # getInfoRecursive :: ChildProperty -> Info Source # getInfo :: ChildProperty -> Info Source # toChildProperty :: ChildProperty -> ChildProperty Source # getSatisfy :: ChildProperty -> Maybe (Propellor Result) Source # |
setDesc :: p -> Desc -> p Source #
getChildren :: p -> [ChildProperty] Source #
addChildren :: p -> [ChildProperty] -> p Source #
getInfoRecursive :: p -> Info Source #
Gets the info of the property, combined with all info of all children properties.
Info, not including info from children.
toChildProperty :: p -> ChildProperty Source #
Gets a ChildProperty representing the Property. You should not normally need to use this.
getSatisfy :: p -> Maybe (Propellor Result) Source #
Gets the action that can be run to satisfy a Property.
You should never run this action directly. Use
ensureProperty
instead.