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

Method seekTo

balancer/pickfirst/pickfirst.go:919–928  ·  view source on GitHub ↗

seekTo returns false if the needle was not found and the current index was left unchanged.

(needle resolver.Address)

Source from the content-addressed store, hash-verified

917// seekTo returns false if the needle was not found and the current index was
918// left unchanged.
919func (al *addressList) seekTo(needle resolver.Address) bool {
920 for ai, addr := range al.addresses {
921 if !equalAddressIgnoringBalAttributes(&addr, &needle) {
922 continue
923 }
924 al.idx = ai
925 return true
926 }
927 return false
928}
929
930// hasNext returns whether incrementing the addressList will result in moving
931// past the end of the list. If the list has already moved past the end, it

Callers 3

UpdateClientConnStateMethod · 0.80
updateSubConnStateMethod · 0.80

Calls 1

Tested by 1