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

Method increment

balancer/pickfirst/pickfirst.go:891–897  ·  view source on GitHub ↗

increment moves to the next index in the address list. This method returns false if it went off the list, true otherwise.

()

Source from the content-addressed store, hash-verified

889// increment moves to the next index in the address list.
890// This method returns false if it went off the list, true otherwise.
891func (al *addressList) increment() bool {
892 if !al.isValid() {
893 return false
894 }
895 al.idx++
896 return al.idx < len(al.addresses)
897}
898
899// currentAddress returns the current address pointed to in the addressList.
900// If the list is in an invalid state, it returns an empty address instead.

Callers 2

Calls 1

isValidMethod · 0.95

Tested by 2