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

Method IterReferences

pkg/cache/redis/reference.go:152–164  ·  view source on GitHub ↗

IterReferences returns an iterator for references stored in Redis.

()

Source from the content-addressed store, hash-verified

150
151// IterReferences returns an iterator for references stored in Redis.
152func (r *ReferenceStorage) IterReferences() (storer.ReferenceIter, error) {
153 // Initialize the iterator
154 iter := &ReferenceIter{
155 client: r.client,
156 namespacePrefix: r.namespacePrefix,
157 cursor: 0,
158 keys: nil,
159 moreData: true, // Assume there's more data until proven otherwise
160 }
161 // Perform the initial scan
162 iter.fetchNextBatch()
163 return iter, nil
164}
165
166// fetchNextBatch fetches the next batch of keys from Redis matching the pattern "ref:*".
167func (iter *ReferenceIter) fetchNextBatch() {

Callers

nothing calls this directly

Calls 1

fetchNextBatchMethod · 0.95

Tested by

no test coverage detected