https://github.com/kevwan/gateway
HTTP to gRPC gateway standalone.
https://github.com/kevwan/gateway
gateway gateway-api gateway-microservice grpc-gateway grpc-web
Last synced: 9 months ago
JSON representation
HTTP to gRPC gateway standalone.
- Host: GitHub
- URL: https://github.com/kevwan/gateway
- Owner: kevwan
- License: mit
- Created: 2022-07-16T05:51:13.000Z (almost 4 years ago)
- Default Branch: main
- Last Pushed: 2023-04-24T16:02:45.000Z (about 3 years ago)
- Last Synced: 2025-10-03T13:49:02.896Z (9 months ago)
- Topics: gateway, gateway-api, gateway-microservice, grpc-gateway, grpc-web
- Language: Go
- Homepage: https://go-zero.dev
- Size: 103 KB
- Stars: 13
- Watchers: 3
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: readme.md
- License: LICENSE
Awesome Lists containing this project
README
# gateway
HTTP to gRPC gateway standalone. An example of go-zero gateway.
## Install
```shell
go install github.com/kevwan/gateway@latest
```
## Usage
Example config:
```yaml
Name: gateway
Host: localhost
Port: 8888
Upstreams:
- Grpc:
Etcd:
Hosts:
- localhost:2379
Key: hello.rpc
# protoset mode
ProtoSet: hello.pb
# Mapping is optional, auto mapping from annotations (google.api.http)
Mapping:
- Method: get
Path: /pingHello/:ping
RpcPath: hello.Hello/Ping
- Grpc:
Endpoints:
- localhost:8081
# no protoset, reflection mode
# remember to enable reflection in server side
Mapping:
- Method: post
Path: /pingWorld
RpcPath: world.World/Ping
```
## Run the gateway
```shell
gateway -f config.yaml
```
## Give a Star! ⭐
If you like or are using this project, please give it a **star**. Thanks!