Get retrieves the transport data for the service with the given name computing it if needed. It returns nil if there is no service with the given name.
(name string)
| 423 | // computing it if needed. It returns nil if there is no service with the given |
| 424 | // name. |
| 425 | func (d *ServicesData) Get(name string) *ServiceData { |
| 426 | if data, ok := d.GRPCServices[name]; ok { |
| 427 | return data |
| 428 | } |
| 429 | service := d.Root.API.GRPC.Service(name) |
| 430 | if service == nil { |
| 431 | return nil |
| 432 | } |
| 433 | d.GRPCServices[name] = d.analyze(service) |
| 434 | return d.GRPCServices[name] |
| 435 | } |
| 436 | |
| 437 | // Endpoint returns the endpoint data for the endpoint with the given name, nil |
| 438 | // if there isn't one. |
no test coverage detected