소스 검색

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