Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Document required behaviour for stream-object-names skip function #29

Open
itowlson opened this issue Oct 15, 2024 · 0 comments
Open

Document required behaviour for stream-object-names skip function #29

itowlson opened this issue Oct 15, 2024 · 0 comments

Comments

@itowlson
Copy link

https://github.com/WebAssembly/wasi-blobstore/blob/005c4250d6d2c969dbc7d7294210c995b4fb86fd/wit/container.wit#L61C1-L64C81 says:

    // skip the next number of objects in the stream
    //
    // This function returns the number of objects skipped, and a boolean indicating if the end of the stream was reached.
    skip-stream-object-names: func(num: u64) -> result<tuple<u64, bool>, error>;

Is an implementation required to skip exactly num (unless it reaches end of stream) - that is, the caller can be sure that when the stream is next read (using read), it will be num objects further along? Or is it required that it skip no more than num, but it's allowed to skip fewer, and it's on the caller to keep polling it if it wants a specific number to be skipped? (I ask because of analogy to the read function, where I assume it is allowed to return fewer than len in each response - at least I hope it is because that's what I plan to do! - and to understand the intended use of the return value.)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant