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

Function GetSocket

channelz/internal/protoconv/socket.go:130–136  ·  view source on GitHub ↗

GetSocket returns the protobuf representation of the socket with the given ID.

(id int64)

Source from the content-addressed store, hash-verified

128// GetSocket returns the protobuf representation of the socket with the given
129// ID.
130func GetSocket(id int64) (*channelzpb.Socket, error) {
131 skt := channelz.GetSocket(id)
132 if skt == nil {
133 return nil, status.Errorf(codes.NotFound, "requested socket %d not found", id)
134 }
135 return socketToProto(skt), nil
136}

Callers 1

GetSocketMethod · 0.92

Calls 3

GetSocketFunction · 0.92
ErrorfFunction · 0.92
socketToProtoFunction · 0.85

Tested by

no test coverage detected