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)
| 591 | // computing it if needed. It returns nil if there is no service with the given |
| 592 | // name. |
| 593 | func (sds *ServicesData) Get(name string) *ServiceData { |
| 594 | if data, ok := sds.HTTPData[name]; ok { |
| 595 | return data |
| 596 | } |
| 597 | svc := sds.Expressions.Service(name) |
| 598 | if svc == nil { |
| 599 | return nil |
| 600 | } |
| 601 | sds.HTTPData[name] = sds.analyze(svc) |
| 602 | return sds.HTTPData[name] |
| 603 | } |
| 604 | |
| 605 | // Endpoint returns the service method transport data for the endpoint with the |
| 606 | // given name, nil if there isn't one. |