Quellcode durchsuchen

Make DelegatingErrorHandler underscored-internal (#658)

George Barnett vor 6 Jahren
Ursprung
Commit
73f380b5fa

+ 4 - 4
Sources/GRPC/DelegatingErrorHandler.swift

@@ -21,17 +21,17 @@ import Logging
 /// A channel handler which allows caught errors to be passed to a `ClientErrorDelegate`. This
 /// handler is intended to be used in the client channel pipeline after the HTTP/2 stream
 /// multiplexer to handle errors which occur on the underlying connection.
-public class DelegatingErrorHandler: ChannelInboundHandler {
-  public typealias InboundIn = Any
+class DelegatingErrorHandler: ChannelInboundHandler {
+  typealias InboundIn = Any
 
   private let logger = Logger(subsystem: .clientChannel)
   private let delegate: ClientErrorDelegate?
 
-  public init(delegate: ClientErrorDelegate?) {
+  init(delegate: ClientErrorDelegate?) {
     self.delegate = delegate
   }
 
-  public func errorCaught(context: ChannelHandlerContext, error: Error) {
+  func errorCaught(context: ChannelHandlerContext, error: Error) {
     // We can ignore unclean shutdown since gRPC is self-terminated and therefore not prone to
     // truncation attacks.
     //

+ 1 - 1
Tests/GRPCTests/DelegatingErrorHandlerTests.swift

@@ -14,7 +14,7 @@
  * limitations under the License.
  */
 import Foundation
-import GRPC
+@testable import GRPC
 import NIO
 import NIOSSL
 import Logging