|
|
@@ -91,11 +91,11 @@ extension ServiceDescriptor {
|
|
|
@available(macOS 15.0, iOS 18.0, watchOS 11.0, tvOS 18.0, visionOS 2.0, *)
|
|
|
internal protocol ControlStreamingServiceProtocol: GRPCCore.RegistrableRPCService {
|
|
|
func unary(request: ServerRequest.Stream<ControlInput>) async throws -> ServerResponse.Stream<ControlOutput>
|
|
|
-
|
|
|
+
|
|
|
func serverStream(request: ServerRequest.Stream<ControlInput>) async throws -> ServerResponse.Stream<ControlOutput>
|
|
|
-
|
|
|
+
|
|
|
func clientStream(request: ServerRequest.Stream<ControlInput>) async throws -> ServerResponse.Stream<ControlOutput>
|
|
|
-
|
|
|
+
|
|
|
func bidiStream(request: ServerRequest.Stream<ControlInput>) async throws -> ServerResponse.Stream<ControlOutput>
|
|
|
}
|
|
|
|
|
|
@@ -146,11 +146,11 @@ extension Control.StreamingServiceProtocol {
|
|
|
@available(macOS 15.0, iOS 18.0, watchOS 11.0, tvOS 18.0, visionOS 2.0, *)
|
|
|
internal protocol ControlServiceProtocol: Control.StreamingServiceProtocol {
|
|
|
func unary(request: ServerRequest.Single<ControlInput>) async throws -> ServerResponse.Single<ControlOutput>
|
|
|
-
|
|
|
+
|
|
|
func serverStream(request: ServerRequest.Single<ControlInput>) async throws -> ServerResponse.Stream<ControlOutput>
|
|
|
-
|
|
|
+
|
|
|
func clientStream(request: ServerRequest.Stream<ControlInput>) async throws -> ServerResponse.Single<ControlOutput>
|
|
|
-
|
|
|
+
|
|
|
func bidiStream(request: ServerRequest.Stream<ControlInput>) async throws -> ServerResponse.Stream<ControlOutput>
|
|
|
}
|
|
|
|
|
|
@@ -161,12 +161,12 @@ extension Control.ServiceProtocol {
|
|
|
let response = try await self.unary(request: ServerRequest.Single(stream: request))
|
|
|
return ServerResponse.Stream(single: response)
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
internal func serverStream(request: ServerRequest.Stream<ControlInput>) async throws -> ServerResponse.Stream<ControlOutput> {
|
|
|
let response = try await self.serverStream(request: ServerRequest.Single(stream: request))
|
|
|
return response
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
internal func clientStream(request: ServerRequest.Stream<ControlInput>) async throws -> ServerResponse.Stream<ControlOutput> {
|
|
|
let response = try await self.clientStream(request: request)
|
|
|
return ServerResponse.Stream(single: response)
|
|
|
@@ -186,7 +186,7 @@ internal protocol ControlClientProtocol: Sendable {
|
|
|
options: CallOptions,
|
|
|
_ body: @Sendable @escaping (ClientResponse.Single<ControlOutput>) async throws -> R
|
|
|
) async throws -> R where R: Sendable
|
|
|
-
|
|
|
+
|
|
|
func serverStream<R>(
|
|
|
request: ClientRequest.Single<ControlInput>,
|
|
|
serializer: some MessageSerializer<ControlInput>,
|
|
|
@@ -194,7 +194,7 @@ internal protocol ControlClientProtocol: Sendable {
|
|
|
options: CallOptions,
|
|
|
_ body: @Sendable @escaping (ClientResponse.Stream<ControlOutput>) async throws -> R
|
|
|
) async throws -> R where R: Sendable
|
|
|
-
|
|
|
+
|
|
|
func clientStream<R>(
|
|
|
request: ClientRequest.Stream<ControlInput>,
|
|
|
serializer: some MessageSerializer<ControlInput>,
|
|
|
@@ -202,7 +202,7 @@ internal protocol ControlClientProtocol: Sendable {
|
|
|
options: CallOptions,
|
|
|
_ body: @Sendable @escaping (ClientResponse.Single<ControlOutput>) async throws -> R
|
|
|
) async throws -> R where R: Sendable
|
|
|
-
|
|
|
+
|
|
|
func bidiStream<R>(
|
|
|
request: ClientRequest.Stream<ControlInput>,
|
|
|
serializer: some MessageSerializer<ControlInput>,
|
|
|
@@ -227,7 +227,7 @@ extension Control.ClientProtocol {
|
|
|
body
|
|
|
)
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
internal func serverStream<R>(
|
|
|
request: ClientRequest.Single<ControlInput>,
|
|
|
options: CallOptions = .defaults,
|
|
|
@@ -241,7 +241,7 @@ extension Control.ClientProtocol {
|
|
|
body
|
|
|
)
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
internal func clientStream<R>(
|
|
|
request: ClientRequest.Stream<ControlInput>,
|
|
|
options: CallOptions = .defaults,
|
|
|
@@ -255,7 +255,7 @@ extension Control.ClientProtocol {
|
|
|
body
|
|
|
)
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
internal func bidiStream<R>(
|
|
|
request: ClientRequest.Stream<ControlInput>,
|
|
|
options: CallOptions = .defaults,
|
|
|
@@ -278,11 +278,11 @@ extension Control.ClientProtocol {
|
|
|
@available(macOS 15.0, iOS 18.0, watchOS 11.0, tvOS 18.0, visionOS 2.0, *)
|
|
|
internal struct ControlClient: Control.ClientProtocol {
|
|
|
private let client: GRPCCore.GRPCClient
|
|
|
-
|
|
|
+
|
|
|
internal init(wrapping client: GRPCCore.GRPCClient) {
|
|
|
self.client = client
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
internal func unary<R>(
|
|
|
request: ClientRequest.Single<ControlInput>,
|
|
|
serializer: some MessageSerializer<ControlInput>,
|
|
|
@@ -299,7 +299,7 @@ internal struct ControlClient: Control.ClientProtocol {
|
|
|
handler: body
|
|
|
)
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
internal func serverStream<R>(
|
|
|
request: ClientRequest.Single<ControlInput>,
|
|
|
serializer: some MessageSerializer<ControlInput>,
|
|
|
@@ -316,7 +316,7 @@ internal struct ControlClient: Control.ClientProtocol {
|
|
|
handler: body
|
|
|
)
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
internal func clientStream<R>(
|
|
|
request: ClientRequest.Stream<ControlInput>,
|
|
|
serializer: some MessageSerializer<ControlInput>,
|
|
|
@@ -333,7 +333,7 @@ internal struct ControlClient: Control.ClientProtocol {
|
|
|
handler: body
|
|
|
)
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
internal func bidiStream<R>(
|
|
|
request: ClientRequest.Stream<ControlInput>,
|
|
|
serializer: some MessageSerializer<ControlInput>,
|