(collect-exit-code-fact facility fact-key script)
Inputs: [facility :- s/Keyword fact-key :- s/Keyword script]
Gets a fact from target node based on output of a exit code echo script. By convention the given script may not have side effects on target system.
fact-key
should be a keyword like :netstat
script
should be a sequence like '("test -e ./secret; echo $?")
The output of echo is transformed to a boolean: 0 -> true everything else -> false
Result is stored in session as ExitCodeFactResult. Boolean output is stored in :out
Inputs: [facility :- s/Keyword fact-key :- s/Keyword script] Gets a fact from target node based on output of a exit code echo script. By convention the given script may not have side effects on target system. `fact-key` should be a keyword like :netstat `script` should be a sequence like '("test -e ./secret; echo $?") The output of echo is transformed to a boolean: 0 -> true everything else -> false Result is stored in session as ExitCodeFactResult. Boolean output is stored in :out
(collect-fact facility fact-key script & options)
Inputs: [facility :- s/Keyword fact-key :- s/Keyword script & options]
Gets a fact from target node based on output of script. By convention the given script has no side effects on target system.
fact-key
should be a keyword like :netstat
script
should be a sequence like '("netsat" "-tulpen")
transform-fn
should be a fn transforming script output to a nested map.
Inputs: [facility :- s/Keyword fact-key :- s/Keyword script & options] Gets a fact from target node based on output of script. By convention the given script has no side effects on target system. `fact-key` should be a keyword like :netstat `script` should be a sequence like '("netsat" "-tulpen") `transform-fn` should be a fn transforming script output to a nested map.
(fact-result script-result context transform-fn)
Inputs: [script-result :- ScriptResult context :- s/Str transform-fn] Returns: FactResult
Inputs: [script-result :- ScriptResult context :- s/Str transform-fn] Returns: FactResult
(parse-exit-code input)
Inputs: [input :- s/Str] Returns: s/Bool
Inputs: [input :- s/Str] Returns: s/Bool
(parse-result-boundaries result)
Inputs: [result :- s/Str] Returns: s/Str
Inputs: [result :- s/Str] Returns: s/Str
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close