grpc

command
v0.3.5 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 20, 2021 License: MIT Imports: 10 Imported by: 0

README

grpc

This example is simple use case with standard output. In this scenario, We print the access log to standard output.

  1. Run application.
go run main.go
  1. Do grpcurl.
grpcurl -v -plaintext -d '{"name":"karrot"}' localhost:8080 helloworld.Greeter/SayHello

Finally, you can get logs like below.

{
  "protocol": "grpc",
  "method": "/helloworld.Greeter/SayHello",
  "status": "OK",
  "time": "2021-12-09T13:02:09.644628Z",
  "elapsed(ms)": 0.013,
  "peer": "[::1]:49960",
  "metadata": "{\":authority\":[\"localhost:8080\"],\"user-agent\":[\"grpcurl/1.8.2 grpc-go/1.37.0\"]}",
  "req": "{\"name\":\"karrot\"}",
  "res": "{\"message\":\"Hello karrot\"}"
}

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL