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
In the current spec the bucket.list-keys operation and associated key-response struct gives a cursor: option<string> as a mechanism for implementing pagination. This introduces several problems for implementors:
How long does the implementation have to keep a continuation around for future pagination? This could potentially be very costly in terms of memory and may create consistency issues.
What happens if the implementation is given a cursor that it doesn't recognize?
What sort of information does the implementation put into the cursor string? How are we sure that implementations won't do something improper with that information, e.g. parse it for hints or otherwise rely on its contents, creating a portability problem?
All of these problems are solved by changing from an option<string> to, instead, defining a new resource cursor { next: func() -> result<key-response, cursor-error> }, changing key-response to contain an option<cursor>, and eliminating the cursor: option<string> argument from list-keys:
The implementation keeps track of the information required to return more values around until the resource is dropped, and can return an error in the case of insufficient memory, consistency issues, etc
Resources are unforgable
Resources are opaque
The text was updated successfully, but these errors were encountered:
In the current spec the
bucket.list-keys
operation and associatedkey-response
struct gives acursor: option<string>
as a mechanism for implementing pagination. This introduces several problems for implementors:All of these problems are solved by changing from an
option<string>
to, instead, defining a newresource cursor { next: func() -> result<key-response, cursor-error> }
, changingkey-response
to contain anoption<cursor>
, and eliminating thecursor: option<string>
argument fromlist-keys
:The text was updated successfully, but these errors were encountered: