mirror of
https://github.com/swift-server/async-http-client.git
synced 2026-06-02 07:37:34 +00:00
move elg provider as a nested class of the client (#40)
motivation: elg provider is likely to be a common pattern in client libraries (eg db drivers), lets prevent type clashes changes: make EventLoopGroupProvider a nested class of HTTPClient
This commit is contained in:
@@ -18,11 +18,6 @@ import NIOConcurrencyHelpers
|
||||
import NIOHTTP1
|
||||
import NIOSSL
|
||||
|
||||
public enum EventLoopGroupProvider {
|
||||
case shared(EventLoopGroup)
|
||||
case createNew
|
||||
}
|
||||
|
||||
public class HTTPClient {
|
||||
public let eventLoopGroup: EventLoopGroup
|
||||
let eventLoopGroupProvider: EventLoopGroupProvider
|
||||
@@ -201,6 +196,11 @@ public class HTTPClient {
|
||||
}
|
||||
}
|
||||
|
||||
public enum EventLoopGroupProvider {
|
||||
case shared(EventLoopGroup)
|
||||
case createNew
|
||||
}
|
||||
|
||||
public struct Timeout {
|
||||
public var connect: TimeAmount?
|
||||
public var read: TimeAmount?
|
||||
|
||||
Reference in New Issue
Block a user