Swiftpack.co -  Apodini/grpc-vapor as Swift Package
Swiftpack.co is a collection of thousands of indexed Swift packages. Search packages.
Apodini/grpc-vapor
gRPC Vapor is a Vapor middleware framework that enables Vapor servers to support, route, encode and decode gRPC requests.
.package(url: "https://github.com/Apodini/grpc-vapor.git", from: "0.1.2")

gRPC Vapor

gRPC Vapor is a Vapor middleware framework that enables Vapor servers to support, route, encode and decode gRPC requests.

This framework is designed to work together with the GRPCVaporGenerator which analyzes the declared gRPC services and messages and then generates the necessary supporting code to route requests, provide encoding and decoding support and provide a proto interface definition file.

This framework is like the 1.0 version of grpc-swift build ontop of SwiftNIO instead of the common C-Core for most implementations. This is due to usage of the Vapor as its networking component. The encoding and decoding of the gRPC messages is realized using the SwiftProtobuf framework.

Supported Systems

This framework works with Vapor version 4.0 or higher and requires the Swift version to be 5.2 or higher.

Framework

The interface of this framework primarly consists of three main components that are needed to declare and integrate gRPC services in an existing Vapor application:

  • A GRPCMiddleware that implements Vapors Middleware protocol and can therefore be added to a Vapor application.
  • A GRPCService protocol that declares a structure or class as a gRPC service and provides a routing method for remote procedure calls.
  • A GRPCModel protocol that declares a structure or class as a gRPC message that can be used as an input or output of remote procedure calls.

Additionally:

Using call handlers GRPCMessage GRPCRequest GRPCStream

Generator

Usage

Instructions to integrate

License

??

Contributing

If you want to contribute your own ideas and changes to feel free to create a github issue or contact me directly via e-mail michael.schlicker@tum.de.

GitHub

link
Stars: 15
Last commit: 1 year ago

Ad: Job Offers

iOS Software Engineer @ Perry Street Software
Perry Street Software is Jack’d and SCRUFF. We are two of the world’s largest gay, bi, trans and queer social dating apps on iOS and Android. Our brands reach more than 20 million members worldwide so members can connect, meet and express themselves on a platform that prioritizes privacy and security. We invest heavily into SwiftUI and using Swift Packages to modularize the codebase.

Release Notes

0.1.2
1 year ago

Swiftpack is being maintained by Petr Pavlik | @ptrpavlik | @swiftpackco | API