MCPcopy Create free account
hub / github.com/encoder-run/operator / IterEncodedObjects

Method IterEncodedObjects

pkg/cache/redis/object.go:147–157  ·  view source on GitHub ↗

IterEncodedObjects returns an iterator for encoded objects stored in Redis.

(t plumbing.ObjectType)

Source from the content-addressed store, hash-verified

145
146// IterEncodedObjects returns an iterator for encoded objects stored in Redis.
147func (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.
160func (iter *EncodedObjectIter) fetchNextBatch() {

Callers

nothing calls this directly

Calls 1

fetchNextBatchMethod · 0.95

Tested by

no test coverage detected