You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Introduces a new
`Items(context.Context, backend.IterateParams) iter.Seq2[backend.Item, error]`
to the etcd backend. The core logic for this function was moved from
GetRange, and GetRange now defers to calling Items and collecting a slice
of items.
The motivation for this change is to attempt to reduce the
complexity of pagination for consumers of GetRange. While
backend.IterateRange and backend.StreamRange do already exists to
serve the same purpose, they too have suffered from pagination bugs
in the past. Additionally, this aims to unify iteration to using
the iter package instead of the various homegrown iteration
mechanisms that exist throughout the code base.
There is also one distinct difference to the iteration api: it
allows retrieving items within the specified range in ascending
or descending key order. While there may not be many use cases for
this today, exposing this in the api from it's inception is easier
than adding functional options, or ItemsAscending/ItemsDescending
later.
0 commit comments