1
0
mirror of https://github.com/gusaul/grpcox.git synced 2025-04-18 11:45:37 +00:00
Go to file
2023-01-20 18:41:58 +07:00
.vscode Change assets to assetfs 2023-01-20 18:41:58 +07:00
core Merge pull request #36 from beruangcoklat/master 2022-10-18 17:38:06 +07:00
handler Change assets to assetfs 2023-01-20 18:41:58 +07:00
index Merge pull request #39 from lilac/master 2022-10-18 17:34:41 +07:00
.gitignore add ctx metadata 2020-06-02 00:22:22 +07:00
config.env add expiry connection and automatic close 2019-04-05 18:07:19 +07:00
docker-compose.yml fix docker compose to enabling exposing port 2019-09-13 14:46:27 +07:00
Dockerfile Moving away from dep and into go modules 2019-10-11 16:08:39 -05:00
go.mod Change assets to assetfs 2023-01-20 18:41:58 +07:00
go.sum Change assets to assetfs 2023-01-20 18:41:58 +07:00
grpcox.go fix panic when folder log not exists 2023-01-20 18:33:27 +07:00
LICENSE Create LICENSE 2018-11-05 03:10:47 +07:00
Makefile add running method alternatives 2019-09-13 14:46:36 +07:00
README.md Change assets to assetfs 2023-01-20 18:41:58 +07:00

gRPCox

Go Report Card

turn gRPCurl into web based UI, extremely easy to use

Features

  • Recognize and provide list of services and methods inside it as an options.
  • Automatically recognize schema input and compose it into JSON based. (ensure your gRPC server supports server reflection). Examples for how to set up server reflection can be found here.
  • Save established connection, and reuse it for next invoke/request (also can close/restart connection)

Installation

Docker

docker pull gusaul/grpcox:latest

then run

docker run -p 6969:6969 -v {ABSOLUTE_PATH_TO_LOG}/log:/log -d gusaul/grpcox

Docker Compose

from terminal, move to grpcox directory, then run command

docker-compose up

if you're using docker and want to connect gRPC on your local machine, then use
host.docker.internal:<your gRPC port> instead of localhost

Golang

if you have golang installed on your local machine, just run command

make start

from grpcox directory

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
BIND_ADDR ip:port to bind service string

set value 0 (zero) to disable auto close idle connection.

Demo

gRPCox Demo

Using AssetFs

By using assetfs this tool can be compiled into 1 binary file, so that it will be easier to use.

Please update assetfs when any files inside index folder are modified:


# Install required package
$ go get github.com/go-bindata/go-bindata/...
$ go get github.com/elazarl/go-bindata-assetfs/...

# Update assetfs
$ go-bindata-assetfs -pkg handler -o handler/binddata.go  index/... 

Compile

if you have golang installed on your local machine, just run command

# Windows
go build -o grpcox.exe

# Unix
go build -o grpcox

from grpcox directory

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
BIND_ADDR ip:port to bind service string

set value 0 (zero) to disable auto close idle connection.

How to use?

Copy your binary file (ex: grpcox.exe) to your favorite folder, and just run it.