Browse Source

Change visibility of `_makeBackpressuredStream` to `package` (#1992)

Gustavo Cairo 1 year ago
parent
commit
33a25b7050

+ 1 - 9
Sources/GRPCCore/Streaming/Internal/RPCAsyncSequence+Buffered.swift

@@ -17,7 +17,7 @@
 @available(macOS 15.0, iOS 18.0, watchOS 11.0, tvOS 18.0, visionOS 2.0, *)
 @available(macOS 15.0, iOS 18.0, watchOS 11.0, tvOS 18.0, visionOS 2.0, *)
 extension RPCAsyncSequence where Failure == any Error {
 extension RPCAsyncSequence where Failure == any Error {
   @inlinable
   @inlinable
-  static func makeBackpressuredStream(
+  package static func makeBackpressuredStream(
     of elementType: Element.Type = Element.self,
     of elementType: Element.Type = Element.self,
     watermarks: (low: Int, high: Int)
     watermarks: (low: Int, high: Int)
   ) -> (stream: Self, writer: RPCWriter<Element>.Closable) {
   ) -> (stream: Self, writer: RPCWriter<Element>.Closable) {
@@ -28,12 +28,4 @@ extension RPCAsyncSequence where Failure == any Error {
 
 
     return (RPCAsyncSequence(wrapping: stream), RPCWriter.Closable(wrapping: continuation))
     return (RPCAsyncSequence(wrapping: stream), RPCWriter.Closable(wrapping: continuation))
   }
   }
-
-  @inlinable
-  public static func _makeBackpressuredStream(
-    of elementType: Element.Type = Element.self,
-    watermarks: (low: Int, high: Int)
-  ) -> (stream: Self, writer: RPCWriter<Element>.Closable) {
-    return Self.makeBackpressuredStream(of: elementType, watermarks: watermarks)
-  }
 }
 }

+ 2 - 2
Sources/GRPCInProcessTransport/InProcessClientTransport.swift

@@ -233,10 +233,10 @@ public struct InProcessClientTransport: ClientTransport {
     options: CallOptions,
     options: CallOptions,
     _ closure: (RPCStream<Inbound, Outbound>) async throws -> T
     _ closure: (RPCStream<Inbound, Outbound>) async throws -> T
   ) async throws -> T {
   ) async throws -> T {
-    let request = RPCAsyncSequence<RPCRequestPart, any Error>._makeBackpressuredStream(
+    let request = RPCAsyncSequence<RPCRequestPart, any Error>.makeBackpressuredStream(
       watermarks: (16, 32)
       watermarks: (16, 32)
     )
     )
-    let response = RPCAsyncSequence<RPCResponsePart, any Error>._makeBackpressuredStream(
+    let response = RPCAsyncSequence<RPCResponsePart, any Error>.makeBackpressuredStream(
       watermarks: (16, 32)
       watermarks: (16, 32)
     )
     )