MCPcopy
hub / github.com/CodisLabs/codis / PopFrontAll

Method PopFrontAll

pkg/proxy/request.go:147–158  ·  view source on GitHub ↗
(onRequest func(r *Request) error)

Source from the content-addressed store, hash-verified

145}
146
147func (c *RequestChan) PopFrontAll(onRequest func(r *Request) error) error {
148 for {
149 r, ok := c.PopFront()
150 if ok {
151 if err := onRequest(r); err != nil {
152 return err
153 }
154 } else {
155 return nil
156 }
157 }
158}
159
160func (c *RequestChan) PopFrontAllVoid(onRequest func(r *Request)) {
161 c.PopFrontAll(func(r *Request) error {

Callers 2

PopFrontAllVoidMethod · 0.95
loopWriterMethod · 0.80

Calls 1

PopFrontMethod · 0.95

Tested by

no test coverage detected