浏览代码

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 年之前
父节点
当前提交
a5450a1e26
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      Sources/GRPCHTTP2TransportNIOPosix/HTTP2ServerTransport+Posix.swift

+ 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