Просмотр исходного кода

Default the server config (#1931)

Motivation:

The server transport takes config which has a natural set of defaults.
They should be the default argument.

Modifications:

- Add default arg

Result:

Easier to use
George Barnett 1 год назад
Родитель
Сommit
a5450a1e26

+ 1 - 1
Sources/GRPCHTTP2TransportNIOPosix/GRPCHTTP2TransportNIOPosix.swift → Sources/GRPCHTTP2TransportNIOPosix/HTTP2ServerTransport+Posix.swift

@@ -30,7 +30,7 @@ extension HTTP2ServerTransport {
 
     public init(
       address: GRPCHTTP2Core.SocketAddress,
-      config: Config,
+      config: Config = .defaults,
       eventLoopGroup: MultiThreadedEventLoopGroup = .singletonMultiThreadedEventLoopGroup
     ) {
       self.address = address