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:
tomer doron
2019-06-02 10:40:00 -07:00
committed by GitHub
parent 93682abeb5
commit 100b04b02d
+5 -5
View File
@@ -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?