Instance Methodheckj.formic 0.3.0Formic
run(host:logger:)
ShellCommand.swift:52@discardableResult func run(host: RemoteHost, logger: Logger?) async throws -> CommandOutput
@discardableResult func run(host: RemoteHost, logger: Logger?) async throws -> CommandOutput
s6Formic12ShellCommandV3run4host6loggerAA0C6OutputVAA10RemoteHostV_7Logging6LoggerVSgtYaKF
What are these?8DNLG
import Formic
๐ Swift library to support IT Automation tasks. ๐ ๐
struct ShellCommand
A command to run on a local or remote host.
struct RemoteHost
A local or remote host.
struct Logger
A Logger
is the central type in SwiftLog
. Its central function is to emit log messages using one of the methods corresponding to a log level.
struct CommandOutput
The structured output of a shell command.
init(_ argString: String, env: [String : String]? = nil, chdir: String? = nil, ignoreFailure: Bool = false, retry: Backoff = .never, executionTimeout: Duration = .seconds(120))
Creates a new command declaration that the engine runs as a shell command.
let commandString: String
The command and arguments to run.
var description: String { get }
A textual representation of the command.
let env: [String : String]?
An optional dictionary of environment variables the system sets when it runs the command.
let executionTimeout: Duration
The maximum duration to allow for the command.
let id: UUID
The ID of the command.
let ignoreFailure: Bool
A Boolean value that indicates whether a failing command should fail a playbook.
let retry: Backoff
The retry settings for the command.