Skip to content

Commit 892f9b3

Browse files
committed
2 parents 0ca0039 + 8288da3 commit 892f9b3

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

67 files changed

+1509
-329
lines changed

.formatter.exs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,8 @@
33
[
44
"{mix,.formatter,.credo}.exs",
55
"{config,lib,priv,test}/**/*.{ex,exs}",
6-
"examples/helloworld/{config,lib,priv,test}/**/*.{ex,exs}"
6+
"examples/helloworld_v2/{config,lib,priv,test}/**/*.{ex,exs}",
7+
"examples/helloworld_v3/{config,lib,priv,test}/**/*.{ex,exs}"
78
]
89
|> Enum.flat_map(&Path.wildcard(&1, match_dot: true))
910
|> Enum.reject(&String.match?(&1, ~r/^.*\.pb\.ex$/))

.github/workflows/ci.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -164,6 +164,9 @@ jobs:
164164

165165
check_example:
166166
name: Run example helloworld tests
167+
strategy:
168+
matrix:
169+
path: [./examples/helloworld_v2, ./examples/helloworld_v3]
167170
runs-on: ubuntu-latest
168171
steps:
169172
- uses: actions/checkout@v4
@@ -176,7 +179,7 @@ jobs:
176179
elixir-version: 1.18.x
177180

178181
- name: Build and Test
179-
working-directory: ./examples/helloworld
182+
working-directory: ${{ matrix.path }}
180183
run: |
181184
mix deps.get
182185
mix test

CHANGELOG.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
# CHANGELOG
2+
3+
## v0.2.0 (2025-06-18)
4+
5+
### Bug fixes
6+
7+
- https://github.com/elixir-grpc/grpc-reflection/issues/53
8+
9+
### Enhancements
10+
11+
- Reflection tree builder refactored to match grpc symbols against GRPC-exposed module names

README.md

Lines changed: 18 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,24 @@
11
# GrpcReflection
22

3+
[![GitHub CI](https://github.com/elixir-grpc/grpc-reflection/actions/workflows/ci.yml/badge.svg)](https://github.com/elixir-grpc/grpc-reflection/actions/workflows/ci.yml)
4+
[![Hex.pm](https://img.shields.io/hexpm/v/grpc_reflection.svg)](https://hex.pm/packages/grpc_reflection)
5+
[![Hex Docs](https://img.shields.io/badge/hex-docs-lightgreen.svg)](https://hexdocs.pm/grpc_reflection/)
6+
[![License](https://img.shields.io/hexpm/l/grpc_reflection.svg)](https://github.com/elixir-grpc/grpc-reflection/blob/main/LICENSE)
7+
[![Total Downloads](https://img.shields.io/hexpm/dt/grpc_reflection.svg)](https://hex.pm/packages/grpc_reflection)
8+
39
Server reflection allows servers to assist clients in runtime construction of requests without having stub information precompiled into the client.
410

511
According to the [GRPC Server Reflection Protocol
612
](https://github.com/grpc/grpc/blob/master/doc/server-reflection.md), the primary usecase for server reflection is to write (typically) command line debugging tools for talking to a grpc server. In particular, such a tool will take in a method and a payload (in human readable text format) send it to the server (typically in binary proto wire format), and then take the response and decode it to text to present to the user.
713

8-
GrpcReflection adds reflection support to a `grpc-elixir` based application. It is a supervised application that can support implemented as a gRPC server using `grpc-elixir`, .
14+
GrpcReflection adds reflection support to applications built with [grpc-elixir](https://hex.pm/packages/grpc). It is a supervised application that can be implemented as a gRPC server using [grpc-elixir](https://github.com/elixir-grpc/grpc).
915

1016
## Installation
1117

1218
The package can be installed by adding `grpc_reflection` to your list of dependencies in `mix.exs`:
1319

1420
```elixir
15-
{:grpc_reflection, "~> 0.1.5"}
21+
{:grpc_reflection, "~> 0.2"}
1622
```
1723

1824
Documentation can be generated with [ExDoc](https://github.com/elixir-lang/ex_doc)
@@ -37,10 +43,10 @@ This is written and tested using [grpcurl](https://github.com/fullstorydev/grpcu
3743
end
3844
```
3945

40-
| Config Option | Description |
41-
| ------------- | ---------------------------------------------------------------------- |
42-
| version | Either `:v1` or `:v2` depending on intended client support |
43-
| services | This is a list of GRPC services that should be included for reflection |
46+
| Config Option | Description |
47+
| :---: | --- |
48+
| `version` | Either `:v1` or `:v1alpha`, depending on intended client support. |
49+
| `services` | This is a list of GRPC services that should be included for reflection. |
4450

4551
1. Add the reflection supervisor to your supervision tree to host the cached reflection state
4652

@@ -57,13 +63,12 @@ This is written and tested using [grpcurl](https://github.com/fullstorydev/grpcu
5763
run(Helloworld.Reflection.Server)
5864
```
5965

60-
## interacting with your reflection server
66+
## Interacting with your reflection server
6167

62-
Here are some example `grpcurl` commands and responses excersizing the reflection capabilities
68+
Here are some examples using [grpcurl](https://github.com/fullstorydev/grpcurl) to demonstrate the reflection capabilities:
6369

6470
```shell
6571
$ grpcurl -v -plaintext 127.0.0.1:50051 list
66-
grpc.reflection.v1.ServerReflection
6772
helloworld.Greeter
6873

6974
$ grpcurl -v -plaintext 127.0.0.1:50051 list helloworld.Greeter
@@ -96,6 +101,7 @@ This module is more thoroughly tested with proto3, but it has some testing with
96101
This is **not** an exhaustive list, contributions are appreciated.
97102

98103
| Application | Reflection version required |
99-
| ----------- | --------------------------- |
100-
| grpcurl | V1 |
101-
| postman | V1alpha |
104+
| --- | :---: |
105+
| [grpcurl](https://github.com/fullstorydev/grpcurl) | V1 |
106+
| [grpcui](https://github.com/fullstorydev/grpcui) | V1 |
107+
| [postman](https://www.postman.com/) | V1alpha |

examples/helloworld/mix.lock

Lines changed: 0 additions & 13 deletions
This file was deleted.
File renamed without changes.

0 commit comments

Comments
 (0)