code: func (s *Storage) Get(c context.Context, req storage.GetRequest, cb storage.GetCallback) error {
  	recs := []*rec(nil)
  	err := s.run(func() error {
  		ls := s.getLogStreamLocked(req.Project, req.Path, false)
  		if ls == nil {
  			return storage.ErrDoesNotExist
  		}
  
  		limit := len(ls.logs)
  		if req.Limit > 0 && req.Limit < limit {
  			limit = req.Limit
  		}
  		if s.MaxGetCount > 0 && s.MaxGetCount < limit {
  			limit = s.MaxGetCount
  		}
  
  		// Grab all records starting from our start index.
  		for idx := req.Index; idx <= ls.latestIndex; idx++ {
  			if le, ok := ls.logs[idx]; ok {
  				recs = append(recs, &rec{
  					index: idx,
  					data:  le,
  				})
  			}
  
  			if len(recs) >= limit {
  				break
  			}
  		}
  		return nil
  	})
  	if err != nil {
  		return err
  	}
  
  	// Punt all of the records upstream. We copy the data to prevent the
  	// callback from accidentally mutating it. We reuse the data buffer to try
  	// and catch errors when the callback retains the data.
  	for _, r := range recs {
  		var dataCopy []byte
  		if !req.KeysOnly {
  			dataCopy = make([]byte, len(r.data))
  			copy(dataCopy, r.data)
  		}
  		if !cb(storage.MakeEntry(dataCopy, r.index)) {
  			break
  		}
  	}
  
  	return nil
  }
docs: // Get implements storage.Storage.