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

Method lamify

balancer/rls/child_policy.go:103–109  ·  view source on GitHub ↗

lamify causes the child policy wrapper to return a picker which will always fail requests. This is used when the wrapper runs into errors when trying to build and parse the child policy configuration.

(err error)

Source from the content-addressed store, hash-verified

101// fail requests. This is used when the wrapper runs into errors when trying to
102// build and parse the child policy configuration.
103func (c *childPolicyWrapper) lamify(err error) {
104 c.logger.Warningf("Entering lame mode: %v", err)
105 atomic.StorePointer(&c.state, unsafe.Pointer(&balancer.State{
106 ConnectivityState: connectivity.TransientFailure,
107 Picker: base.NewErrPicker(err),
108 }))
109}

Calls 2

NewErrPickerFunction · 0.92
WarningfMethod · 0.65

Tested by

no test coverage detected