rlsPicker selects the subConn to be used for a particular RPC. It does not manage subConns directly and delegates to pickers provided by child policies.
| 51 | // rlsPicker selects the subConn to be used for a particular RPC. It does not |
| 52 | // manage subConns directly and delegates to pickers provided by child policies. |
| 53 | type rlsPicker struct { |
| 54 | // The keyBuilder map used to generate RLS keys for the RPC. This is built |
| 55 | // by the LB policy based on the received ServiceConfig. |
| 56 | kbm keys.BuilderMap |
| 57 | // Endpoint from the user's original dial target. Used to set the `host_key` |
| 58 | // field in `extra_keys`. |
| 59 | origEndpoint string |
| 60 | |
| 61 | lb *rlsBalancer |
| 62 | |
| 63 | // The picker is given its own copy of the below fields from the RLS LB policy |
| 64 | // to avoid having to grab the mutex on the latter. |
| 65 | rlsServerTarget string |
| 66 | grpcTarget string |
| 67 | metricsRecorder estats.MetricsRecorder |
| 68 | defaultPolicy *childPolicyWrapper // Child policy for the default target. |
| 69 | ctrlCh *controlChannel // Control channel to the RLS server. |
| 70 | maxAge time.Duration // Cache max age from LB config. |
| 71 | staleAge time.Duration // Cache stale age from LB config. |
| 72 | bg exitIdler |
| 73 | logger *internalgrpclog.PrefixLogger |
| 74 | } |
| 75 | |
| 76 | // isFullMethodNameValid return true if name is of the form `/service/method`. |
| 77 | func isFullMethodNameValid(name string) bool { |
nothing calls this directly
no outgoing calls
no test coverage detected