GetSubChannel returns the protobuf representation of the subchannel with the given ID.
(id int64)
| 57 | // GetSubChannel returns the protobuf representation of the subchannel with the |
| 58 | // given ID. |
| 59 | func GetSubChannel(id int64) (*channelzpb.Subchannel, error) { |
| 60 | subChan := channelz.GetSubChannel(id) |
| 61 | if subChan == nil { |
| 62 | return nil, status.Errorf(codes.NotFound, "requested sub channel %d not found", id) |
| 63 | } |
| 64 | return subChannelToProto(subChan), nil |
| 65 | } |
no test coverage detected