ServiceDiscovery is a mock discovery interface
| 30 | |
| 31 | // ServiceDiscovery is a mock discovery interface |
| 32 | type ServiceDiscovery struct { |
| 33 | services map[host.Name]*model.Service |
| 34 | |
| 35 | handlers model.ControllerHandlers |
| 36 | |
| 37 | networkGateways []model.NetworkGateway |
| 38 | model.NetworkGatewaysHandler |
| 39 | |
| 40 | // EndpointShards table. Key is the fqdn of the service, ':', port |
| 41 | instancesByPortNum map[string][]*model.ServiceInstance |
| 42 | instancesByPortName map[string][]*model.ServiceInstance |
| 43 | |
| 44 | // Used by GetProxyServiceInstance, used to configure inbound (list of services per IP) |
| 45 | // We generally expect a single instance - conflicting services need to be reported. |
| 46 | ip2instance map[string][]*model.ServiceInstance |
| 47 | WantGetProxyServiceTargets []model.ServiceTarget |
| 48 | InstancesError error |
| 49 | Controller model.Controller |
| 50 | ClusterID cluster.ID |
| 51 | |
| 52 | // Used by GetProxyWorkloadLabels |
| 53 | ip2workloadLabels map[string]labels.Instance |
| 54 | |
| 55 | // XDSUpdater will push EDS changes to the ADS model. |
| 56 | XdsUpdater model.XDSUpdater |
| 57 | |
| 58 | // Single mutex for now - it's for debug only. |
| 59 | mutex sync.Mutex |
| 60 | } |
| 61 | |
| 62 | var ( |
| 63 | _ model.Controller = &ServiceDiscovery{} |
nothing calls this directly
no outgoing calls
no test coverage detected