Swiftpack.co - Apodini/grpc-vapor as Swift Package

Swiftpack.co is a collection of thousands of indexed Swift packages. Search packages.
See all packages published by Apodini.
Apodini/grpc-vapor 0.1.2
gRPC Vapor is a Vapor middleware framework that enables Vapor servers to support, route, encode and decode gRPC requests.
⭐️ 25
🕓 3 years ago
macOS
.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 [email protected].

GitHub

link
Stars: 25
Last commit: 3 years ago
Advertisement: IndiePitcher.com - Cold Email Software for Startups

Release Notes

0.1.2
3 years ago

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