Crate peace_item_sh_cmd

Source
Expand description

Manages running a shell command for the peace framework.

This item is designed to take in separate shell commands for each of the following:

  • Current state logic, whose stdout defines the current state (String).
  • Goal state logic, whose stdout defines the goal state (String).
  • State diff logic, whose stdout defines the state difference.
  • Ensure check, whose stdout defines if ensure execution needs to run – true means execution is required, false means execution is required.
  • Ensure execution, whose stdout defines state physical.
  • Clean check, whose exit status defines if clean execution needs to run – true means execution is required, false means execution is required.
  • Clean execution.

Structs§

ShCmd
Shell command to execute.
ShCmdApplyFns
ApplyFns for the command to execute.
ShCmdData
Data used to run a shell command.
ShCmdItem
Item for executing a shell command.
ShCmdParams
Grouping of commands to run a shell command idempotently.
ShCmdParamsFieldWise
Specification of how to look up values for an item’s parameters.
ShCmdParamsPartial
Item parameters that may not necessarily have values.
ShCmdState
Newtype wrapper for State<ShCmdStatePhysical<Id>, ShCmdExecutionRecord>.
ShCmdStateDiff
Diff between the current and goal file extraction.
ShCmdStateDiffFn
Runs a shell command to obtain the ShCmd diff.

Enums§

CmdVariant
Command variants which take in scripts in ShCmdParams.
ShCmdError
Error while managing command execution.
ShCmdExecutionRecord
Record of a shell command execution.
ShCmdStateLogical
State of the shell command execution.