fullstorydev / fullstorydev/grpcurl
support generate method invoke template
- Dominant language
- Go
- Stars
- 12.8k
- Forks
- 580
- Avg merge
- 1h 8m
- Merged PRs (30d)
- 5
Description
Although we can compse request param step by step,it would be more convenient if grpcurl can generate it automately.
### traditionally
step 1
```bash
➜ ~ grpcurl localhost:20789 describe grpc.health.v1.Health.Check
grpc.health.v1.Health.Check is a method:
rpc Check ( .grpc.health.v1.HealthCheckRequest ) returns ( .grpc.health.v1.HealthCheckResponse );
➜ ~ grpcurl localhost:20789 describe .grpc.health.v1.HealthCheckRequest
grpc.health.v1.HealthCheckRequest is a message:
message HealthCheckRequest {
string service = 1;
}
```
then make the request json, and invoke :
```bash
➜ ~ grpcurl -d '{"service": "test"}' localhost:20789 grpc.health.v1.Health/Check
{
"status": "SERVING",
"idle": 0.5,
"max_thread_count": 24
}
```
### newly
Suppose we support template command, and template will generate a invoke template
```bash
➜ ~ grpcurl localhost:20789 template grpc.health.v1.Health.Check
grpcurl -d '{"service": "test"}' localhost:20789 grpc.health.v1.Health/Check
```
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.