MCPcopy
hub / github.com/grpc/grpc-go / UpdateConfigSelector

Method UpdateConfigSelector

internal/resolver/config_selector.go:172–176  ·  view source on GitHub ↗

UpdateConfigSelector swaps to the provided ConfigSelector and blocks until all uses of the previous ConfigSelector have completed.

(cs ConfigSelector)

Source from the content-addressed store, hash-verified

170// UpdateConfigSelector swaps to the provided ConfigSelector and blocks until
171// all uses of the previous ConfigSelector have completed.
172func (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.
179func (scs *SafeConfigSelector) SelectConfig(r RPCInfo) (*RPCConfig, error) {

Callers 4

NewClientFunction · 0.80
applyFailingLBLockedMethod · 0.80

Calls 2

LockMethod · 0.45
UnlockMethod · 0.45

Tested by 1