Documented the AppArguments protocol and the Environment+Properties extension in the library target.

This commit is contained in:
2025-03-09 00:11:49 +01:00
parent 980c8e15f6
commit ab4a9207c5
4 changed files with 12 additions and 7 deletions
@@ -4,6 +4,7 @@ extension Environment {
// MARK: Computed
/// The logging level set in the environment variables.
public var logLevel: String? {
self.get("LOG_LEVEL")
}
@@ -1,11 +1,15 @@
import Logging
/// A type that defines the input arguments that the `Hummingbird`app receives.
public protocol AppArguments {
// MARK: Properties
/// A bind address for the app.
var hostname: String { get }
/// A logging level to configure for the app.
var logLevel: Logger.Level? { get }
/// A port for the app to use,
var port: Int { get }
}