cue-labs / oci

Go modules related to OCI (Open Container Initiative) registries
Apache License 2.0
23 stars 4 forks source link

ociregistry: provide pagination support in Lister #3

Closed rogpeppe closed 7 months ago

rogpeppe commented 1 year ago

Currently the ociregistry.Lister entry points each return an iterator that iterates through all items. The HTTP API provides pagnination support which we should reflect in the Interface entry points, making it possible for ociserver to pass through the "last item" information to the underlying interface.

This would require a backwardly incompatible change to Interface. One possibility might be to make these methods arbitrarily extensible in the future by providing a struct argument. That could potentially be enough to enable future search-related functionality without breaking the API or adding new methods.