UpdateConfigSelector swaps to the provided ConfigSelector and blocks until all uses of the previous ConfigSelector have completed.
(cs ConfigSelector)
| 170 | // UpdateConfigSelector swaps to the provided ConfigSelector and blocks until |
| 171 | // all uses of the previous ConfigSelector have completed. |
| 172 | func (scs *SafeConfigSelector) UpdateConfigSelector(cs ConfigSelector) { |
| 173 | scs.mu.Lock() |
| 174 | defer scs.mu.Unlock() |
| 175 | scs.cs = cs |
| 176 | } |
| 177 | |
| 178 | // SelectConfig defers to the current ConfigSelector in scs. |
| 179 | func (scs *SafeConfigSelector) SelectConfig(r RPCInfo) (*RPCConfig, error) { |