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

Method NewSubConn

clientconn_test.go:1005–1012  ·  view source on GitHub ↗
(addrs []resolver.Address, opts balancer.NewSubConnOptions)

Source from the content-addressed store, hash-verified

1003}
1004
1005func (ccw *stateRecordingCCWrapper) NewSubConn(addrs []resolver.Address, opts balancer.NewSubConnOptions) (balancer.SubConn, error) {
1006 oldListener := opts.StateListener
1007 opts.StateListener = func(s balancer.SubConnState) {
1008 ccw.notifier <- s.ConnectivityState
1009 oldListener(s)
1010 }
1011 return ccw.ClientConn.NewSubConn(addrs, opts)
1012}
1013
1014// Keep reading until something causes the connection to die (EOF, server
1015// closed, etc). Useful as a tool for mindlessly keeping the connection

Callers

nothing calls this directly

Calls 1

NewSubConnMethod · 0.65

Tested by

no test coverage detected