From 4b8590f3439ac6d9848f1e42c58bd27e49b027f0 Mon Sep 17 00:00:00 2001 From: Adriel Bento Date: Fri, 30 Sep 2022 18:41:38 -0300 Subject: [PATCH 1/3] update README.md --- README.md | 48 +++++++++++++++++++++++++++--------------------- 1 file changed, 27 insertions(+), 21 deletions(-) diff --git a/README.md b/README.md index 7c9d2891..d18f84df 100644 --- a/README.md +++ b/README.md @@ -1,15 +1,27 @@ # gRPC Elixir [![Hex.pm](https://img.shields.io/hexpm/v/grpc.svg)](https://hex.pm/packages/grpc) -[![Travis Status](https://travis-ci.org/elixir-grpc/grpc.svg?branch=master)](https://travis-ci.org/elixir-grpc/grpc) +[![Travis Status](https://app.travis-ci.com/elixir-grpc/grpc.svg?branch=master)](https://app.travis-ci.com/elixir-grpc/grpc) [![GitHub actions Status](https://github.com/elixir-grpc/grpc/workflows/CI/badge.svg)](https://github.com/elixir-grpc/grpc/actions) +[![License](https://img.shields.io/hexpm/l/grpc.svg)](https://github.com/elixir-grpc/grpc/blob/master/LICENSE.md) +[![Last Updated](https://img.shields.io/github/last-commit/elixir-grpc/grpc.svg)](https://github.com/elixir-grpc/grpc/commits/master) +[![Total Download](https://img.shields.io/hexpm/dt/grpc.svg)](https://hex.pm/packages/elixir-grpc/grpc) An Elixir implementation of [gRPC](http://www.grpc.io/). -**NOTICE: gun** +## Table of contents -The Gun library doesn't have a full 2.0 release yet, so we depend on `:grcp_gun 2.0.1` for now. -This is the same as `:gun 2.0.0-rc.2`, but Hex doesn't let us depend on RC versions for releases. +- [Notice](#notice) +- [Installation](#installation) +- [Usage](#usage) +- [Features](#features) +- [Benchmark](#benchmark) +- [Contributing](#contributing) + +## Notice + +The [Gun](https://github.com/ninenines/gun) library doesn't have a full 2.0 release yet, so we depend on `:grcp_gun 2.0.1` for now. +This is the same as `:gun 2.0.0-rc.2`, but [Hex](https://hex.pm/) doesn't let us depend on RC versions for releases. ## Installation @@ -30,7 +42,9 @@ The package can be installed as: ## Usage 1. Generate Elixir code from proto file as [protobuf-elixir](https://github.com/tony612/protobuf-elixir#usage) shows(especially the `gRPC Support` section). + 2. Implement the server side code like below and remember to return the expected message types. + ```elixir defmodule Helloworld.Greeter.Server do use GRPC.Server, service: Helloworld.Greeter.Service @@ -71,6 +85,7 @@ end ``` 4. Call rpc: + ```elixir iex> {:ok, channel} = GRPC.Stub.connect("localhost:50051") iex> request = Helloworld.HelloRequest.new(name: "grpc-elixir") @@ -83,21 +98,18 @@ iex> {:ok, channel} = GRPC.Stub.connect("localhost:50051", interceptors: [GRPC.L Check [examples](examples) and [interop](interop)(Interoperability Test) for some examples. -## TODO +## Features -- [x] Unary RPC -- [x] Server streaming RPC -- [x] Client streaming RPC -- [x] Bidirectional streaming RPC -- [x] Helloworld and RouteGuide examples -- [x] Doc and more tests -- [x] Authentication with TLS -- [x] Improve code generation from protos ([protobuf-elixir](https://github.com/tony612/protobuf-elixir) [#8](https://github.com/elixir-grpc/grpc/issues/8)) +- [x] [Unary RPC](https://grpc.io/docs/what-is-grpc/core-concepts/#unary-rpc) +- [x] [Server streaming RPC](https://grpc.io/docs/what-is-grpc/core-concepts/#server-streaming-rpc) +- [x] [Client streaming RPC](https://grpc.io/docs/what-is-grpc/core-concepts/#client-streaming-rpc) +- [x] [Bidirectional streaming RPC](https://grpc.io/docs/what-is-grpc/core-concepts/#bidirectional-streaming-rpc) +- [x] [Authentication with TLS](https://grpc.io/docs/guides/auth/#supported-auth-mechanisms) - [x] Timeout for unary calls -- [x] Errors handling +- [x] [Errors handling](https://grpc.io/docs/guides/error/) - [x] Benchmarking - [x] Logging -- [x] Interceptors(See `GRPC.Endpoint`) +- [x] Interceptors(See [`GRPC.Endpoint`](https://github.com/elixir-grpc/grpc/blob/master/lib/grpc/endpoint.ex)) - [x] [Connection Backoff](https://github.com/grpc/grpc/blob/master/doc/connection-backoff.md) - [x] Data compression - [x] Support other encoding(other than protobuf) @@ -108,12 +120,6 @@ Check [examples](examples) and [interop](interop)(Interoperability Test) for som 2. [Benchmark](benchmark) followed by official spec -## Sponsors - -This project is being sponsored by [Tubi](https://tubitv.com/). Thank you! - - - ## Contributing You contributions are welcome! From c6801194f31cd0f7c047fac2be1c9349d30d5aef Mon Sep 17 00:00:00 2001 From: Adriel Bento Date: Fri, 30 Sep 2022 19:32:52 -0300 Subject: [PATCH 2/3] use the new markdown syntax support --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index d18f84df..86264061 100644 --- a/README.md +++ b/README.md @@ -19,8 +19,8 @@ An Elixir implementation of [gRPC](http://www.grpc.io/). - [Contributing](#contributing) ## Notice - -The [Gun](https://github.com/ninenines/gun) library doesn't have a full 2.0 release yet, so we depend on `:grcp_gun 2.0.1` for now. +> __Note__ +> The [Gun](https://github.com/ninenines/gun) library doesn't have a full 2.0 release yet, so we depend on `:grcp_gun 2.0.1` for now. This is the same as `:gun 2.0.0-rc.2`, but [Hex](https://hex.pm/) doesn't let us depend on RC versions for releases. ## Installation From dd527e5847710b901b73f5f722dc49ff568b97ba Mon Sep 17 00:00:00 2001 From: Paulo Valente <16843419+polvalente@users.noreply.github.com> Date: Wed, 12 Oct 2022 15:20:27 -0300 Subject: [PATCH 3/3] chore: apply suggestion --- README.md | 23 ++++++++++------------- 1 file changed, 10 insertions(+), 13 deletions(-) diff --git a/README.md b/README.md index 86264061..8fe4dc57 100644 --- a/README.md +++ b/README.md @@ -100,19 +100,16 @@ Check [examples](examples) and [interop](interop)(Interoperability Test) for som ## Features -- [x] [Unary RPC](https://grpc.io/docs/what-is-grpc/core-concepts/#unary-rpc) -- [x] [Server streaming RPC](https://grpc.io/docs/what-is-grpc/core-concepts/#server-streaming-rpc) -- [x] [Client streaming RPC](https://grpc.io/docs/what-is-grpc/core-concepts/#client-streaming-rpc) -- [x] [Bidirectional streaming RPC](https://grpc.io/docs/what-is-grpc/core-concepts/#bidirectional-streaming-rpc) -- [x] [Authentication with TLS](https://grpc.io/docs/guides/auth/#supported-auth-mechanisms) -- [x] Timeout for unary calls -- [x] [Errors handling](https://grpc.io/docs/guides/error/) -- [x] Benchmarking -- [x] Logging -- [x] Interceptors(See [`GRPC.Endpoint`](https://github.com/elixir-grpc/grpc/blob/master/lib/grpc/endpoint.ex)) -- [x] [Connection Backoff](https://github.com/grpc/grpc/blob/master/doc/connection-backoff.md) -- [x] Data compression -- [x] Support other encoding(other than protobuf) +- Various kinds of RPC: + - [Unary](https://grpc.io/docs/what-is-grpc/core-concepts/#unary-rpc) + - [Server-streaming](https://grpc.io/docs/what-is-grpc/core-concepts/#server-streaming-rpc) + - [Client-streaming](https://grpc.io/docs/what-is-grpc/core-concepts/#client-streaming-rpc) + - [Bidirectional-streaming](https://grpc.io/docs/what-is-grpc/core-concepts/#bidirectional-streaming-rpc) +- [TLS Authentication](https://grpc.io/docs/guides/auth/#supported-auth-mechanisms) +- [Error handling](https://grpc.io/docs/guides/error/) +- Interceptors(See [`GRPC.Endpoint`](https://github.com/elixir-grpc/grpc/blob/master/lib/grpc/endpoint.ex)) +- [Connection Backoff](https://github.com/grpc/grpc/blob/master/doc/connection-backoff.md) +- Data compression ## Benchmark