Get get a proto from ring.
()
| 47 | |
| 48 | // Get get a proto from ring. |
| 49 | func (r *Ring) Get() (proto *grpc.Proto, err error) { |
| 50 | if r.rp == r.wp { |
| 51 | return nil, errors.ErrRingEmpty |
| 52 | } |
| 53 | proto = &r.data[r.rp&r.mask] |
| 54 | return |
| 55 | } |
| 56 | |
| 57 | // GetAdv incr read index. |
| 58 | func (r *Ring) GetAdv() { |
no outgoing calls
no test coverage detected