IterEncodedObjects returns an iterator for encoded objects stored in Redis.
(t plumbing.ObjectType)
| 145 | |
| 146 | // IterEncodedObjects returns an iterator for encoded objects stored in Redis. |
| 147 | func (s *ObjectStorage) IterEncodedObjects(t plumbing.ObjectType) (storer.EncodedObjectIter, error) { |
| 148 | iter := &EncodedObjectIter{ |
| 149 | client: s.client, |
| 150 | namespacePrefix: s.namespacePrefix, |
| 151 | t: t, |
| 152 | cursor: 0, |
| 153 | moreData: true, // Initially assume there is data to fetch |
| 154 | } |
| 155 | iter.fetchNextBatch() // Initial fetch |
| 156 | return iter, nil |
| 157 | } |
| 158 | |
| 159 | // fetchNextBatch fetches the next batch of keys from Redis matching the object type pattern. |
| 160 | func (iter *EncodedObjectIter) fetchNextBatch() { |
nothing calls this directly
no test coverage detected