Skip to content

Commit ccc11f9

Browse files
committed
Making choice of implementation public
1 parent f1e55ad commit ccc11f9

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

Sources/OpenAPIURLSession/URLSessionTransport.swift

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -71,14 +71,14 @@ public struct URLSessionTransport: ClientTransport {
7171
/// If none is provided, the system uses the shared URLSession.
7272
public init(session: URLSession = .shared) { self.init(session: session, implementation: .platformDefault) }
7373

74-
enum Implementation {
74+
public enum Implementation: Sendable {
7575
case buffering
7676
case streaming(requestBodyStreamBufferSize: Int, responseBodyStreamWatermarks: (low: Int, high: Int))
7777
}
7878

79-
var implementation: Implementation
79+
public var implementation: Implementation
8080

81-
init(session: URLSession = .shared, implementation: Implementation = .platformDefault) {
81+
public init(session: URLSession = .shared, implementation: Implementation = .platformDefault) {
8282
self.session = session
8383
if case .streaming = implementation {
8484
precondition(Implementation.platformSupportsStreaming, "Streaming not supported on platform")
@@ -352,7 +352,7 @@ extension URLSessionTransport.Configuration.Implementation {
352352
#endif
353353
}
354354

355-
static var platformDefault: Self {
355+
public static var platformDefault: Self {
356356
guard platformSupportsStreaming else { return .buffering }
357357
return .streaming(
358358
requestBodyStreamBufferSize: 16 * 1024,

0 commit comments

Comments
 (0)