项目作者: cookpad

项目描述 :
gRPC server and client for Ruby
高级语言: Ruby
项目地址: git://github.com/cookpad/griffin.git
创建时间: 2018-10-17T10:47:41Z
项目社区:https://github.com/cookpad/griffin

开源协议:MIT License

下载


Griffin

Gem Version

Griffin is gRPC server which supports multi process by using serverengine.
Griffin also supports building gRPC client.

Installation

Add this line to your application’s Gemfile:

  1. gem 'griffin'

And then execute:

  1. $ bundle

Or install it yourself as:

  1. gem install griffin

Usage

Server

  1. class GreeterServer < Helloworld::Greeter::Service
  2. def say_hello(hello_req, _unused_call)
  3. Helloworld::HelloReply.new(message: "Hello #{hello_req.name}")
  4. end
  5. end
  6. Griffin::Server.configure do |c|
  7. c.bind '127.0.0.1'
  8. c.port 50051
  9. c.services GreeterServer.new
  10. c.workers 2 # A number of worker process
  11. end
  12. Griffin::Server.run

Interceptors

Development

  1. bundle install

Contributing

Bug reports and pull requests are welcome on GitHub at https://github.com/cookpad/griffin.

License

The gem is available as open source under the terms of the MIT License.