Classes
The following classes are available globally.
-
Undocumented
See moreDeclaration
Swift
public class ClientStreamingCallHandler<RequestMessage, ResponseMessage> : AnyCallHandler, RequestProcessable, ResponseProcessable where RequestMessage : GRPCMessage, ResponseMessage : GRPCMessage
-
Undocumented
See moreDeclaration
Swift
public class ServerStreamingCallHandler<RequestMessage, ResponseMessage> : AnyCallHandler, RequestProcessable, StreamingResponseProcessable where RequestMessage : GRPCMessage, ResponseMessage : GRPCMessage
-
Undocumented
See moreDeclaration
Swift
public class StreamingCallHandler<RequestMessage, ResponseMessage> : AnyCallHandler, RequestProcessable, StreamingResponseProcessable where RequestMessage : GRPCMessage, ResponseMessage : GRPCMessage
-
Undocumented
See moreDeclaration
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
See moreMoiddleware
protocol which requires it to implement arespond
function.Declaration
Swift
public class GRPCMiddleware : Middleware
-
A
See moreGRPCClientStream
instance represents a client-streaming gRPC request that provides aforEach
method which takes a closure that gets called for each incoming message of the stream, acollect
method that returns all incoming messages collected as an array, and a genericsucceed
method to create a singe response future. It implements theGRPCRequestType
that requires it to contain its VaporRequest
and provides several shortcuts to several Vapor stack functionality. This is also a generic class which has type constrait for theRequestModel
type which implements theGRPCModel
protocol.Declaration
Swift
public class GRPCClientStreamRequest<RequestModel> : GRPCRequestType where RequestModel : GRPCModel
-
A
See moreGRPCRequest
instance represents a unary gRPC request that provides the single incoming value and a genericsucceed
method to create a singe response future. It implements theGRPCRequestType
that requires it to contain its VaporRequest
and provides several shortcuts to several Vapor stack functionality. This is also a generic class which has type constrait for theRequestModel
type which implements theGRPCModel
protocol.Declaration
Swift
public class GRPCRequest<RequestModel> : GRPCRequestType where RequestModel : GRPCModel
-
A
See moreGRPCServerStreamRequest
instance represents a server-streaming gRPC request that provides the single incoming value andsendResponse
andsendEnd
methods to send a multiple responses. It implements theGRPCRequestType
that requires it to contain its VaporRequest
and provides several shortcuts to several Vapor stack functionality. This is also a generic class which has two type constraits that implement theGRPCModel
protocol. One constraint for theRequestModel
type and one constraint for theResponseModel
.Declaration
Swift
public class GRPCServerStreamRequest<RequestModel, ResponseModel> : GRPCRequestType where RequestModel : GRPCModel, ResponseModel : GRPCModel
-
Undocumented
See moreDeclaration
Swift
public class GRPCStreamRequest<RequestModel, ResponseModel> : GRPCRequestType where RequestModel : GRPCModel, ResponseModel : GRPCModel