GetServer returns the protobuf representation of the server with the given ID.
(id int64)
| 65 | // GetServer returns the protobuf representation of the server with the given |
| 66 | // ID. |
| 67 | func 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 | } |
no test coverage detected