MCPcopy
hub / github.com/grpc/grpc-go / convertToPbDuration

Function convertToPbDuration

channelz/internal/protoconv/sockopt_linux.go:34–36  ·  view source on GitHub ↗
(sec int64, usec int64)

Source from the content-addressed store, hash-verified

32var logger = grpclog.Component("channelz")
33
34func convertToPbDuration(sec int64, usec int64) *durationpb.Duration {
35 return durationpb.New(time.Duration(sec*1e9 + usec*1e3))
36}
37
38func sockoptToProto(skopts *channelz.SocketOptionData) []*channelzpb.SocketOption {
39 if skopts == nil {

Callers 1

sockoptToProtoFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected