Initializerheckj.formic 0.3.0Formic
init(logger:)
Creates a new engine.
init(logger: Logger? = nil)
Creates a new engine.
init(logger: Logger? = nil)
import Formic
๐ Swift library to support IT Automation tasks. ๐ ๐
actor Engine
An engine that runs playbooks and exposes the results.
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.
nonisolated let commandUpdates: AsyncStream<(CommandExecutionResult)>
An asynchronous stream of command execution results.
nonisolated func run(host: RemoteHost, command: (any Command)) async throws -> CommandExecutionResult
Directly runs a single command against a single host, applying the retry and timeout policies of the command.
@discardableResult func run(host: RemoteHost, displayProgress: Bool, detailLevel: CommandOutputDetail = .silent(emoji: true), commands: [(any Command)]) async throws -> [CommandExecutionResult]
Directly runs a series of commands against a single host.
@discardableResult func run(hosts: [RemoteHost], displayProgress: Bool, detailLevel: CommandOutputDetail = .silent(emoji: true), commands: [(any Command)]) async throws -> [RemoteHost : [CommandExecutionResult]]
Runs a series of commands on all of the hosts you provide.