An open API service indexing awesome lists of open source software.

https://github.com/tgrziminiar/go-grpc-handler

Example of how to use go grpc Sreaming and Unary
https://github.com/tgrziminiar/go-grpc-handler

go golang grpc grpc-go grpc-streaming protobuf streaming unary-rpc

Last synced: 2 months ago
JSON representation

Example of how to use go grpc Sreaming and Unary

Awesome Lists containing this project

README

          

## Example Of Grpc Streaming In This Repo
- Unary RPC (normal request response)
- Bidirectional streaming RPC
- Client streaming RPC
- Server streaming RPC

## Install Grpc
```
go install google.golang.org/protobuf/cmd/protoc-gen-go@v1.28
go install google.golang.org/grpc/cmd/protoc-gen-go-grpc@v1.2
```

## Export Path Grpc
```
export PATH="$PATH:$(go env GOPATH)/bin"
```




# Run this following command to make the code run

## Unary RPC
```

make s-proto

make ss

make sc
```

## Bidirectional streaming RPC
```

make b-proto

make bs

make bc
```

## Client streaming RPC
```

make c-proto

make cs

make cc
```

## Server streaming RPC
```

make ss-proto

make sss

make ssc
```