The project is in a healthy, maintained state
A dynamic type checker for gRPC methods
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
 Dependencies

Development

>= 0

Runtime

 Project Readme

GrpcTypechecker Build Status

A dynamic type checker for gRPC methods. This gem consists of two features:

  • a client interceptor for the run-time type check of gRPC requests, and
  • a monkey patch for type checking gRPC responses during execution.

Installation

Add this line to your application's Gemfile:

gem 'grpc_typechecker'

And then execute:

$ bundle

Or install it yourself as:

$ gem install grpc_typechecker

Usage

If you would like to type check the gRPC requsts, please set the instance of GrpcTypechecker::ClientInterceptor as an interceptor of your gRPC application. For instance:

server = Grpc::Testing::TestService::Stub.new(
  "localhost:12345",
  :this_port_is_insecure,
  interceptors: [
    GrpcTypechecker::ClientInterceptor(service_class: Grpc::Testing::TestService)
  ]
)

On the other hand, the dynamic type checker for gRPC responses will be automatically introduced only by requiring grpc_typechecker

require 'grpc_typechecker'