Skip to content

Commit

Permalink
vendor: add go-grpc-middleware
Browse files Browse the repository at this point in the history
Rebased to master PR etcd-io#9994.  Fixed a Go format issue in
v3rpc/interceptor.go.  Updated vendor to include go-grpc-middleware.
  • Loading branch information
Jingyi Hu committed Aug 14, 2018
1 parent f2384f6 commit ec19ca7
Show file tree
Hide file tree
Showing 5 changed files with 318 additions and 11 deletions.
27 changes: 27 additions & 0 deletions bill-of-materials.json
Original file line number Diff line number Diff line change
Expand Up @@ -336,6 +336,33 @@
}
]
},
{
"project": "go.uber.org/atomic",
"licenses": [
{
"type": "MIT License",
"confidence": 0.9891304347826086
}
]
},
{
"project": "go.uber.org/multierr",
"licenses": [
{
"type": "MIT License",
"confidence": 0.9891304347826086
}
]
},
{
"project": "go.uber.org/zap",
"licenses": [
{
"type": "MIT License",
"confidence": 0.9891304347826086
}
]
},
{
"project": "golang.org/x/crypto",
"licenses": [
Expand Down
21 changes: 10 additions & 11 deletions etcdserver/api/v3rpc/interceptor.go
Original file line number Diff line number Diff line change
Expand Up @@ -78,8 +78,8 @@ func logUnaryRequestStats(ctx context.Context, lg *zap.Logger, info *grpc.UnaryS
remote = peerInfo.Addr.String()
}
var responseType string = info.FullMethod
var reqCount, respCount int64 = 0, 0
var reqSize, respSize int = 0, 0
var reqCount, respCount int64
var reqSize, respSize int
var reqContent string
switch _resp := resp.(type) {
case *pb.RangeResponse:
Expand Down Expand Up @@ -152,15 +152,14 @@ func logUnaryRequestStats(ctx context.Context, lg *zap.Logger, info *grpc.UnaryS
func logGenericRequestStats(lg *zap.Logger, startTime time.Time, duration time.Duration, remote string, responseType string,
reqCount int64, reqSize int, respCount int64, respSize int, reqContent string) {
if lg == nil {
plog.Debugf(
"start time = %v, " +
"time spent = %v, " +
"remote = %s, " +
"response type = %s, " +
"request count = %d, " +
"request size = %d, " +
"response count = %d, " +
"response size = %d, " +
plog.Debugf("start time = %v, "+
"time spent = %v, "+
"remote = %s, "+
"response type = %s, "+
"request count = %d, "+
"request size = %d, "+
"response count = %d, "+
"response size = %d, "+
"request content = %s",
startTime, duration, remote, responseType, reqCount, reqSize, respCount, respSize, reqContent,
)
Expand Down
183 changes: 183 additions & 0 deletions vendor/github.com/grpc-ecosystem/go-grpc-middleware/chain.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit ec19ca7

Please sign in to comment.