Classes

The following classes are available globally.

  • Undocumented

    See more

    Declaration

    Swift

    public class ClientStreamingCallHandler<RequestMessage, ResponseMessage> : AnyCallHandler, RequestProcessable, ResponseProcessable where RequestMessage : GRPCMessage, ResponseMessage : GRPCMessage
  • Undocumented

    See more

    Declaration

    Swift

    public class ServerStreamingCallHandler<RequestMessage, ResponseMessage> : AnyCallHandler, RequestProcessable, StreamingResponseProcessable where RequestMessage : GRPCMessage, ResponseMessage : GRPCMessage
  • Undocumented

    See more

    Declaration

    Swift

    public class StreamingCallHandler<RequestMessage, ResponseMessage> : AnyCallHandler, RequestProcessable, StreamingResponseProcessable where RequestMessage : GRPCMessage, ResponseMessage : GRPCMessage
  • Undocumented

    See more

    Declaration

    Swift

    public class UnaryCallHandler<RequestMessage, ResponseMessage> : AnyCallHandler, RequestProcessable, ResponseProcessable where RequestMessage : GRPCMessage, ResponseMessage : GRPCMessage
  • A GRPCMiddleware instance can be integrated as a middleware into the Vapor application like this:

    app.middleware.use(GRPCMiddleware())

    This middleware checks the content-type of incoming requests and in handles them in case of a gRPC request or forwards them to the next middleware. It implements Vapor’s Moiddleware protocol which requires it to implement a respondfunction.

    See more

    Declaration

    Swift

    public class GRPCMiddleware : Middleware
  • A GRPCClientStream instance represents a client-streaming gRPC request that provides a forEach method which takes a closure that gets called for each incoming message of the stream, a collect method that returns all incoming messages collected as an array, and a generic succeed method to create a singe response future. It implements the GRPCRequestType that requires it to contain its Vapor Request and provides several shortcuts to several Vapor stack functionality. This is also a generic class which has type constrait for the RequestModel type which implements the GRPCModel protocol.

    See more

    Declaration

    Swift

    public class GRPCClientStreamRequest<RequestModel> : GRPCRequestType where RequestModel : GRPCModel
  • A GRPCRequest instance represents a unary gRPC request that provides the single incoming value and a generic succeed method to create a singe response future. It implements the GRPCRequestType that requires it to contain its Vapor Request and provides several shortcuts to several Vapor stack functionality. This is also a generic class which has type constrait for the RequestModel type which implements the GRPCModel protocol.

    See more

    Declaration

    Swift

    public class GRPCRequest<RequestModel> : GRPCRequestType where RequestModel : GRPCModel
  • A GRPCServerStreamRequest instance represents a server-streaming gRPC request that provides the single incoming value and sendResponse and sendEnd methods to send a multiple responses. It implements the GRPCRequestType that requires it to contain its Vapor Request and provides several shortcuts to several Vapor stack functionality. This is also a generic class which has two type constraits that implement the GRPCModel protocol. One constraint for the RequestModel type and one constraint for the ResponseModel.

    See more

    Declaration

    Swift

    public class GRPCServerStreamRequest<RequestModel, ResponseModel> : GRPCRequestType where RequestModel : GRPCModel, ResponseModel : GRPCModel
  • Undocumented

    See more

    Declaration

    Swift

    public class GRPCStreamRequest<RequestModel, ResponseModel> : GRPCRequestType where RequestModel : GRPCModel, ResponseModel : GRPCModel