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

Method breakWith

balancer/pickfirst/metrics_test.go:348–353  ·  view source on GitHub ↗
(err error)

Source from the content-addressed store, hash-verified

346}
347
348func (c *controllableConn) breakWith(err error) {
349 c.mu.Lock()
350 c.readErr = err
351 c.mu.Unlock()
352 c.Conn.Close()
353}
354
355// runDisconnectLabelTest sets up a pickfirst balancer and a basic OpenTelemetry
356// environment to test the "grpc.disconnect_error" label on subchannel disconnections.

Callers 1

TestDisconnectLabelMethod · 0.80

Calls 3

CloseMethod · 0.65
LockMethod · 0.45
UnlockMethod · 0.45

Tested by

no test coverage detected