Skip to content

Commit 3ce2a0b

Browse files
committed
Add documentation
1 parent 627a8d8 commit 3ce2a0b

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

Sources/ComposableArchitecturePattern/Server.swift

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,17 @@
88
import SwiftUI
99
import OSLog
1010

11+
/// The HTTP method type.
1112
public enum HTTPMethod: String, Equatable {
1213
case DELETE
1314
case GET
1415
case POST
1516
case PUT
1617
}
1718

19+
/// An actor that handles server interactions.
20+
///
21+
/// This is the equivalent of a web service. The idea is for this to be the base actor to handle all server interactions that correspond to the defined API's. This ensures API's can be scoped to specific servers, thus allowing you to scope feature support.
1822
public protocol Server: Actor {
1923
/// Environments supported by this server.
2024
var environments: [ServerEnvironment] { get }
@@ -33,6 +37,7 @@ public protocol Server: Actor {
3337
/// All the requests currently being processed.
3438
var requestsBeingProcessed: Set<UUID> { get set }
3539

40+
/// The logger to use with communicating server activity.
3641
var logger: Logger { get }
3742

3843
/// Designated initializer

0 commit comments

Comments
 (0)