Protocolheckj.formic 0.3.0Formic
CollectionResource
A collection of resources that can be found and queried from a host.
protocol CollectionResource : ParsedResource
Browse conforming typesA collection of resources that can be found and queried from a host.
protocol CollectionResource : ParsedResource
import Formic
๐ Swift library to support IT Automation tasks. ๐ ๐
protocol ParsedResource : Resource
A resource that provides an inquiry command and parser to return the state of the resource.
protocol Equatable
A type that can be compared for value equality.
protocol Hashable : Equatable
A type that can be hashed into a Hasher
to produce an integer hash value.
protocol Resource : Hashable, Sendable
A type that can be queried from a host to provide information about itself.
protocol Sendable
static var collectionInquiry: (any Command) { get }
The shell command to use to get the state for this resource.
static func collectionParse(_ output: Data) throws -> [Self]
Returns a list of resources from the string output from a command.
static func namedInquiry(_ name: String) -> (any Command)
Returns an inquiry command that retrieves the output to parse into a resource.
static func queryCollection(from: RemoteHost, logger: Logger?) async throws -> ([Self], Date)
Returns a list of resources for the host you provide.
static func queryCollection(from host: RemoteHost, logger: Logger?) async throws -> ([Self], Date)
Queries the state of the resource from the given host.