| 193 | } |
| 194 | |
| 195 | type remoteBalancer struct { |
| 196 | lbgrpc.UnimplementedLoadBalancerServer |
| 197 | sls chan *lbpb.ServerList |
| 198 | statsDura time.Duration |
| 199 | done chan struct{} |
| 200 | stats *rpcStats |
| 201 | statsChan chan *lbpb.ClientStats |
| 202 | fbChan chan struct{} |
| 203 | balanceLoadCh chan struct{} // notify successful invocation of BalanceLoad |
| 204 | |
| 205 | wantUserAgent string // expected user-agent in metadata of BalancerLoad |
| 206 | wantServerName string // expected server name in InitialLoadBalanceRequest |
| 207 | } |
| 208 | |
| 209 | func newRemoteBalancer(wantUserAgent, wantServerName string, statsChan chan *lbpb.ClientStats) *remoteBalancer { |
| 210 | return &remoteBalancer{ |
nothing calls this directly
no outgoing calls
no test coverage detected