Skip to content

Commit

Permalink
Change visibility of _makeBackpressuredStream to package (grpc#1992)
Browse files Browse the repository at this point in the history
  • Loading branch information
gjcairo authored Jul 25, 2024
1 parent 899c121 commit 33a25b7
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
@available(macOS 15.0, iOS 18.0, watchOS 11.0, tvOS 18.0, visionOS 2.0, *)
extension RPCAsyncSequence where Failure == any Error {
@inlinable
static func makeBackpressuredStream(
package static func makeBackpressuredStream(
of elementType: Element.Type = Element.self,
watermarks: (low: Int, high: Int)
) -> (stream: Self, writer: RPCWriter<Element>.Closable) {
Expand All @@ -28,12 +28,4 @@ extension RPCAsyncSequence where Failure == any Error {

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)
}
}
4 changes: 2 additions & 2 deletions Sources/GRPCInProcessTransport/InProcessClientTransport.swift
Original file line number Diff line number Diff line change
Expand Up @@ -233,10 +233,10 @@ public struct InProcessClientTransport: ClientTransport {
options: CallOptions,
_ closure: (RPCStream<Inbound, Outbound>) async throws -> T
) async throws -> T {
let request = RPCAsyncSequence<RPCRequestPart, any Error>._makeBackpressuredStream(
let request = RPCAsyncSequence<RPCRequestPart, any Error>.makeBackpressuredStream(
watermarks: (16, 32)
)
let response = RPCAsyncSequence<RPCResponsePart, any Error>._makeBackpressuredStream(
let response = RPCAsyncSequence<RPCResponsePart, any Error>.makeBackpressuredStream(
watermarks: (16, 32)
)

Expand Down

0 comments on commit 33a25b7

Please sign in to comment.