1
0
mirror of https://github.com/gusaul/grpcox.git synced 2024-12-27 03:10:42 +00:00
grpcox/README.md

48 lines
2.0 KiB
Markdown
Raw Normal View History

2018-11-04 20:03:52 +00:00
# gRPCox
2019-03-13 07:11:09 +00:00
[![Go Report Card](https://goreportcard.com/badge/github.com/gusaul/grpcox)](https://goreportcard.com/report/github.com/gusaul/grpcox)
2019-03-13 07:10:35 +00:00
2018-11-04 20:03:52 +00:00
turn [gRPCurl](https://github.com/fullstorydev/grpcurl) into web based UI, extremely easy to use
2019-04-05 03:45:06 +00:00
## Features
- Recognize and provide list of services and methods inside it as an options.
2019-04-05 03:49:42 +00:00
- Automatically recognize schema input and compose it into JSON based. (ensure your gRPC server supports [server reflection](https://github.com/grpc/grpc/blob/master/src/proto/grpc/reflection/v1alpha/reflection.proto)). Examples for how to set up server reflection can be found [here](https://github.com/grpc/grpc/blob/master/doc/server-reflection.md#known-implementations).
2019-04-05 03:45:06 +00:00
- Save established connection, and reuse it for next invoke/request (also can close/restart connection)
## Installation
2019-12-03 10:14:07 +00:00
### Docker
```shell
docker pull gusaul/grpcox:latest
```
then run
```shell
docker run -p 6969:6969 -v {ABSOLUTE_PATH_TO_LOG}/log:/log -d gusaul/grpcox
```
2019-04-05 03:45:06 +00:00
### Docker Compose
2019-04-05 03:54:18 +00:00
from terminal, move to grpcox directory, then run command
2019-04-05 03:45:06 +00:00
```shell
docker-compose up
```
2019-09-13 07:46:36 +00:00
if you're using docker and want to connect gRPC on your local machine, then use
<br/>`host.docker.internal:<your gRPC port>` instead of `localhost`
### Golang
if you have golang installed on your local machine, just run command
```shell
make start
```
2019-12-03 10:14:07 +00:00
from grpcox directory
2019-04-05 03:45:06 +00:00
2019-04-05 13:07:46 +00:00
configure app preferences by editing `config.env` file
| var | usage | type | unit |
|-----------------|---------------------------------------------|--------|--------|
| MAX_LIFE_CONN | maximum idle time connection before closed | number | minute |
| TICK_CLOSE_CONN | ticker interval to sweep expired connection | number | second |
2021-02-05 19:26:15 +00:00
| BIND_ADDR | ip:port to bind service | string | |
2019-04-05 13:07:46 +00:00
set value `0 (zero)` to disable auto close idle connection.
2019-04-05 03:45:06 +00:00
## Demo
![gRPCox Demo](https://raw.githubusercontent.com/gusaul/grpcox/master/index/img/demogrpcox.gif)