Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/cookpad/griffin
gRPC server and client for Ruby
https://github.com/cookpad/griffin
grpc grpc-ruby grpc-server ruby
Last synced: 2 months ago
JSON representation
gRPC server and client for Ruby
- Host: GitHub
- URL: https://github.com/cookpad/griffin
- Owner: cookpad
- License: mit
- Created: 2018-10-17T10:47:41.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2023-08-08T05:55:50.000Z (over 1 year ago)
- Last Synced: 2024-10-31T13:14:36.780Z (3 months ago)
- Topics: grpc, grpc-ruby, grpc-server, ruby
- Language: Ruby
- Homepage:
- Size: 87.9 KB
- Stars: 102
- Watchers: 7
- Forks: 9
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE.txt
Awesome Lists containing this project
README
# Griffin
[![Gem Version](https://badge.fury.io/rb/griffin.svg)](https://badge.fury.io/rb/griffin)
Griffin is [gRPC](https://grpc.io/) server which supports multi process by using [serverengine](https://github.com/treasure-data/serverengine).
Griffin also supports building gRPC client.## Installation
Add this line to your application's Gemfile:
```ruby
gem 'griffin'
```And then execute:
```
$ bundle
```Or install it yourself as:
```
gem install griffin
```## Usage
#### Server
```ruby
class GreeterServer < Helloworld::Greeter::Service
def say_hello(hello_req, _unused_call)
Helloworld::HelloReply.new(message: "Hello #{hello_req.name}")
end
endGriffin::Server.configure do |c|
c.bind '127.0.0.1'c.port 50051
c.services GreeterServer.new
c.workers 2 # A number of worker process
endGriffin::Server.run
```
## Interceptors
* [cookpad/griffin-interceptors](https://github.com/cookpad/griffin-interceptors) collection of interceptors
## Development
```
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](https://opensource.org/licenses/MIT).