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

Function GetServer

channelz/internal/protoconv/server.go:67–73  ·  view source on GitHub ↗

GetServer returns the protobuf representation of the server with the given ID.

(id int64)

Source from the content-addressed store, hash-verified

65// GetServer returns the protobuf representation of the server with the given
66// ID.
67func GetServer(id int64) (*channelzpb.Server, error) {
68 srv := channelz.GetServer(id)
69 if srv == nil {
70 return nil, status.Errorf(codes.NotFound, "requested server %d not found", id)
71 }
72 return serverToProto(srv), nil
73}

Callers 1

GetServerMethod · 0.92

Calls 3

GetServerFunction · 0.92
ErrorfFunction · 0.92
serverToProtoFunction · 0.85

Tested by

no test coverage detected