|
@@ -134,7 +134,7 @@ extension ErrorService {
|
|
|
|
|
|
|
|
// Default implementation of 'registerMethods(with:)'.
|
|
// Default implementation of 'registerMethods(with:)'.
|
|
|
extension ErrorService.StreamingServiceProtocol {
|
|
extension ErrorService.StreamingServiceProtocol {
|
|
|
- internal func registerMethods(with router: inout GRPCCore.RPCRouter) {
|
|
|
|
|
|
|
+ internal func registerMethods<Transport>(with router: inout GRPCCore.RPCRouter<Transport>) where Transport: GRPCCore.ServerTransport {
|
|
|
router.registerHandler(
|
|
router.registerHandler(
|
|
|
forMethod: ErrorService.Method.ThrowError.descriptor,
|
|
forMethod: ErrorService.Method.ThrowError.descriptor,
|
|
|
deserializer: GRPCProtobuf.ProtobufDeserializer<ThrowInput>(),
|
|
deserializer: GRPCProtobuf.ProtobufDeserializer<ThrowInput>(),
|
|
@@ -212,14 +212,14 @@ extension ErrorService {
|
|
|
/// The ``Client`` provides an implementation of ``ClientProtocol`` which wraps
|
|
/// The ``Client`` provides an implementation of ``ClientProtocol`` which wraps
|
|
|
/// a `GRPCCore.GRPCCClient`. The underlying `GRPCClient` provides the long-lived
|
|
/// a `GRPCCore.GRPCCClient`. The underlying `GRPCClient` provides the long-lived
|
|
|
/// means of communication with the remote peer.
|
|
/// means of communication with the remote peer.
|
|
|
- internal struct Client: ClientProtocol {
|
|
|
|
|
- private let client: GRPCCore.GRPCClient
|
|
|
|
|
|
|
+ internal struct Client<Transport>: ClientProtocol where Transport: GRPCCore.ClientTransport {
|
|
|
|
|
+ private let client: GRPCCore.GRPCClient<Transport>
|
|
|
|
|
|
|
|
/// Creates a new client wrapping the provided `GRPCCore.GRPCClient`.
|
|
/// Creates a new client wrapping the provided `GRPCCore.GRPCClient`.
|
|
|
///
|
|
///
|
|
|
/// - Parameters:
|
|
/// - Parameters:
|
|
|
/// - client: A `GRPCCore.GRPCClient` providing a communication channel to the service.
|
|
/// - client: A `GRPCCore.GRPCClient` providing a communication channel to the service.
|
|
|
- internal init(wrapping client: GRPCCore.GRPCClient) {
|
|
|
|
|
|
|
+ internal init(wrapping client: GRPCCore.GRPCClient<Transport>) {
|
|
|
self.client = client
|
|
self.client = client
|
|
|
}
|
|
}
|
|
|
|
|
|