-
Notifications
You must be signed in to change notification settings - Fork 25
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
Issue 225: Implement list streams controller API #242
Conversation
Signed-off-by: Sandeep <[email protected]>
Signed-off-by: Sandeep <[email protected]>
Signed-off-by: Sandeep <[email protected]>
Codecov Report
@@ Coverage Diff @@
## master #242 +/- ##
==========================================
+ Coverage 79.52% 79.77% +0.24%
==========================================
Files 51 51
Lines 10102 10208 +106
==========================================
+ Hits 8034 8143 +109
+ Misses 2068 2065 -3
|
Signed-off-by: Sandeep <[email protected]>
Codecov Report
@@ Coverage Diff @@
## master #242 +/- ##
==========================================
- Coverage 79.52% 78.53% -1.00%
==========================================
Files 51 51
Lines 10102 10510 +408
==========================================
+ Hits 8034 8254 +220
- Misses 2068 2256 +188
|
Signed-off-by: Sandeep <[email protected]>
Signed-off-by: Sandeep <[email protected]>
Signed-off-by: Sandeep <[email protected]>
Signed-off-by: Sandeep <[email protected]>
Signed-off-by: Sandeep <[email protected]>
Signed-off-by: Sandeep <[email protected]>
Signed-off-by: Sandeep <[email protected]>
Signed-off-by: Sandeep <[email protected]>
Thanks Sandeep! That's really nice! |
Signed-off-by: Sandeep <[email protected]>
Yes @Tristan1900 , that was my initial plan. I later realized that we cannot have pub trait ControllerClient: Send + Sync {
fn list_stream(&self, scope: &Scope) -> impl Stream<Item = ResultRetry<String>> // this is not allowed.
} |
@shrids Thanks yeah I didn't know that. Looks like |
/// | ||
/// The below snippets show case the example uses. | ||
/// Sample 1: | ||
///```ignore |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do you want ignore
or no_run
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I used ignore
since pravega_client module is not visible here
use pravega_client::client_factory::ClientFactory;
| ^^^^^^^^^^^^^^ use of undeclared crate or module `pravega_client`
Is there a way around it?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh, yeah that a different crate. Sorry I don't think there is a way around that which doesn't involve adding a dev-dependency.
Signed-off-by: Sandeep <[email protected]>
Signed-off-by: Sandeep <[email protected]>
Change log description
impl Stream<Item = Result<String, RetryError<ControllerError>>>
to handle huge stream lists with pagination.Purpose of the change
Fixes #225
What the code does
impl Stream
thereby lazily fetch the next page of streams from PravegaThis uses the
futures::stream::unfold
to fetch streams under a given scope.CLI Option for list-streams.
How to verify it
The existing and newly added tests should pass.
Verified it for a huge list of streams against standalone.