Safe Haskell | None |
---|---|
Language | Haskell2010 |
Definition of external tasks
Synopsis
- data InputPath
- data ParamField
- newtype Param = Param [ParamField]
- data ConvParam f = ConvParam {}
- paramFieldToText :: Applicative f => ConvParam f -> ParamField -> f Text
- paramToText :: Applicative f => ConvParam f -> Param -> f Text
- stringParam :: String -> Param
- textParam :: Text -> Param
- pathParam :: InputPath -> Param
- contentParam :: Content t -> Param
- externalFileParam :: ExternallyAssuredFile -> Param
- externalDirectoryParam :: ExternallyAssuredDirectory -> Param
- envParam :: Text -> Param
- uidParam :: Param
- gidParam :: Param
- outParam :: Param
- data OutputCapture
- outputCaptureToRelFile :: OutputCapture -> Maybe (Path Rel File)
- data Env
- = EnvInherit
- | EnvExplicit [(Text, Param)]
- data ExternalTask = ExternalTask {
- _etCommand :: Text
- _etParams :: [Param]
- _etEnv :: Env
- _etWriteToStdOut :: OutputCapture
- data TaskDescription = TaskDescription {}
- etWriteToStdOut :: Lens' ExternalTask OutputCapture
- etParams :: Lens' ExternalTask [Param]
- etEnv :: Lens' ExternalTask Env
- etCommand :: Lens' ExternalTask Text
- tdTask :: Lens' TaskDescription ExternalTask
- tdOutput :: Lens' TaskDescription ContentHash
Documentation
Set of items which may be treated as an input path to an external task.
IPItem Item | An item in the content store. |
IPExternalFile ExternallyAssuredFile | An external file whose contents are considered assured by the external system. |
IPExternalDir ExternallyAssuredDirectory | An external directory whose contents are considered assured by the external system. |
Instances
data ParamField Source #
Component of a parameter
ParamText !Text | Text component. |
ParamPath !InputPath | Reference to a path to a content store item. |
ParamEnv !Text | Reference to an environment variable. |
ParamUid | Reference to the effective user ID of the executor. |
ParamGid | Reference to the effective group ID of the executor. |
ParamOut | Reference to the output path in the content store. |
ParamCmd Param | A quoted command that we can pass to another program as an argument. |
Instances
A parameter to an external task
The runtime values to external references, e.g. environment variables, should not significantly influence the result of the external task. In particular, the content hash will not depend on these runtime values.
Instances
Show Param Source # | |
IsString Param Source # | |
Defined in Control.Funflow.External fromString :: String -> Param # | |
Generic Param Source # | |
Semigroup Param Source # | |
Monoid Param Source # | |
ToJSON Param Source # | |
Defined in Control.Funflow.External | |
FromJSON Param Source # | |
Store Param Source # | |
ContentHashable IO Param Source # | |
Defined in Control.Funflow.External contentHashUpdate :: Context SHA256 -> Param -> IO (Context SHA256) Source # contentHash :: Param -> IO ContentHash Source # | |
type Rep Param Source # | |
Defined in Control.Funflow.External type Rep Param = D1 (MetaData "Param" "Control.Funflow.External" "funflow-1.5.0-IcEGfJSp3ag8T7kfAGHQUp" True) (C1 (MetaCons "Param" PrefixI False) (S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 [ParamField]))) |
Converter of path components.
ConvParam | |
|
paramFieldToText :: Applicative f => ConvParam f -> ParamField -> f Text Source #
paramToText :: Applicative f => ConvParam f -> Param -> f Text Source #
Transform a parameter to text using the given converter.
stringParam :: String -> Param Source #
pathParam :: InputPath -> Param Source #
Reference to a path to either: - a content store item, or - an externally assured file/directory.
contentParam :: Content t -> Param Source #
Reference to a path to a file or directory within a store item.
externalFileParam :: ExternallyAssuredFile -> Param Source #
Reference an externally assured file
externalDirectoryParam :: ExternallyAssuredDirectory -> Param Source #
Reference an externally assured file
data OutputCapture Source #
Control how and where stdout from the process is captured. Some external steps will write their output to stdout rather than to a file.
NoOutputCapture | Specify that the step will write its output files directly, and that stdout will not be captured in the step output. |
StdOutCapture | Capture output to a file named |
CustomOutCapture (Path Rel File) | Capture output to a custom named file in the output directory. |
Instances
outputCaptureToRelFile :: OutputCapture -> Maybe (Path Rel File) Source #
Get the file to write output to, if this is desired.
Control the environment set for the external process. This can either inherit from the surrounding environment, or explicitly set things.
EnvInherit | Inherit all environment variables from the surrounding shell. Note that the values of these variables will not be taken into account in the content hash, and so changes to them will not trigger a rerun of the step. |
EnvExplicit [(Text, Param)] |
Instances
Show Env Source # | |
Generic Env Source # | |
ToJSON Env Source # | |
Defined in Control.Funflow.External | |
FromJSON Env Source # | |
Store Env Source # | |
ContentHashable IO Env Source # | |
Defined in Control.Funflow.External contentHashUpdate :: Context SHA256 -> Env -> IO (Context SHA256) Source # contentHash :: Env -> IO ContentHash Source # | |
type Rep Env Source # | |
Defined in Control.Funflow.External type Rep Env = D1 (MetaData "Env" "Control.Funflow.External" "funflow-1.5.0-IcEGfJSp3ag8T7kfAGHQUp" False) (C1 (MetaCons "EnvInherit" PrefixI False) (U1 :: Type -> Type) :+: C1 (MetaCons "EnvExplicit" PrefixI False) (S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 [(Text, Param)]))) |
data ExternalTask Source #
A monomorphic description of an external task. This is basically just a command which can be run.
ExternalTask | |
|
Instances
data TaskDescription Source #
Instances
Show TaskDescription Source # | |
Defined in Control.Funflow.External showsPrec :: Int -> TaskDescription -> ShowS # show :: TaskDescription -> String # showList :: [TaskDescription] -> ShowS # | |
Generic TaskDescription Source # | |
Defined in Control.Funflow.External type Rep TaskDescription :: Type -> Type # from :: TaskDescription -> Rep TaskDescription x # to :: Rep TaskDescription x -> TaskDescription # | |
type Rep TaskDescription Source # | |
Defined in Control.Funflow.External type Rep TaskDescription = D1 (MetaData "TaskDescription" "Control.Funflow.External" "funflow-1.5.0-IcEGfJSp3ag8T7kfAGHQUp" False) (C1 (MetaCons "TaskDescription" PrefixI True) (S1 (MetaSel (Just "_tdOutput") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 ContentHash) :*: S1 (MetaSel (Just "_tdTask") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 ExternalTask))) |