ServiceDiscovery enumerates Istio service instances. nolint: lll
| 949 | // ServiceDiscovery enumerates Istio service instances. |
| 950 | // nolint: lll |
| 951 | type ServiceDiscovery interface { |
| 952 | NetworkGatewaysWatcher |
| 953 | |
| 954 | // Services list declarations of all services in the system |
| 955 | Services() []*Service |
| 956 | |
| 957 | // GetService retrieves a service by host name if it exists |
| 958 | GetService(hostname host.Name) *Service |
| 959 | |
| 960 | // GetProxyServiceTargets returns the service targets that co-located with a given Proxy |
| 961 | // |
| 962 | // Co-located generally means running in the same network namespace and security context. |
| 963 | // |
| 964 | // A Proxy operating as a Sidecar will return a non-empty slice. A stand-alone Proxy |
| 965 | // will return an empty slice. |
| 966 | // |
| 967 | // There are two reasons why this returns multiple ServiceTargets instead of one: |
| 968 | // - A ServiceTargets has a single Port. But a Service |
| 969 | // may have many ports. So a workload implementing such a Service would need |
| 970 | // multiple ServiceTargets, one for each port. |
| 971 | // - A single workload may implement multiple logical Services. |
| 972 | // |
| 973 | // In the second case, multiple services may be implemented by the same physical port number, |
| 974 | // though with a different ServicePort and IstioEndpoint for each. If any of these overlapping |
| 975 | // services are not HTTP or H2-based, behavior is undefined, since the listener may not be able to |
| 976 | // determine the intended destination of a connection without a Host header on the request. |
| 977 | GetProxyServiceTargets(*Proxy) []ServiceTarget |
| 978 | GetProxyWorkloadLabels(*Proxy) labels.Instance |
| 979 | |
| 980 | // MCSServices returns information about the services that have been exported/imported via the |
| 981 | // Kubernetes Multi-Cluster Services (MCS) ServiceExport API. Only applies to services in |
| 982 | // Kubernetes clusters. |
| 983 | MCSServices() []MCSServiceInfo |
| 984 | } |
| 985 | |
| 986 | type AmbientIndexes interface { |
| 987 | ServicesWithWaypoint(key string) []ServiceWaypointInfo |
no outgoing calls
no test coverage detected
searching dependent graphs…