https://github.com/movsb/grpc-http-dialer
Dial GRPC over HTTP.
https://github.com/movsb/grpc-http-dialer
grpc grpc-go
Last synced: about 1 month ago
JSON representation
Dial GRPC over HTTP.
- Host: GitHub
- URL: https://github.com/movsb/grpc-http-dialer
- Owner: movsb
- Created: 2021-01-25T13:12:49.000Z (over 4 years ago)
- Default Branch: main
- Last Pushed: 2021-01-25T14:02:40.000Z (over 4 years ago)
- Last Synced: 2025-04-02T12:49:20.918Z (6 months ago)
- Topics: grpc, grpc-go
- Language: Go
- Homepage:
- Size: 8.79 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# GRPC HTTP Dialer
GRPC HTTP Dialer lets you make a GRPC connection over HTTP.
## Example
* Server side
```go
http.Handle(grpchttpdialer.ProxyPath, grpchttpdialer.Handler())
if err := http.ListenAndServe(":8080", nil); err != nil {
panic(err)
}
```* Client side
```go
conn, err := grpc.Dial(
`localhost:43210`,
grpc.WithInsecure(),
grpc.WithContextDialer(grpchttpdialer.Dialer(`localhost:8080`)),
)
```For more details, see the [example](./example) folder.