-
-
Notifications
You must be signed in to change notification settings - Fork 328
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Introduce `GetParams` support As part of a larger change to support version matching strategies (to reduce I/O pressure), ListParams were separated into List and Watch params. To complete the feature set, this change adds support for `GetParams`, mirroing the upstream client-go layout for the type. In the context of this change, we added a GetParams struct that does implicit version matching (semantics are quite easy, any = "0", NotOlderThan = specific, non-zero version, and unspecified is most recent). We use the struct in all request methods and in Api core methods. `ListParams` with version matching semantics is used for list_metadata, so the same was done here (extended GetParams to get_metadata and all other asssociated methods) even if it was outside of the scope of the issue. As part of the change, we also had to change the examples and tests. Since the version was (largely) unspecified, we use the default derived implementation; for tests and examples, this change should be non-functional (unspecified is the same as unset). Fixes #1174 Signed-off-by: Matei David <[email protected]> * Correctly quote resourceVersion in code docs Signed-off-by: Matei David <[email protected]> * Add unit tests Signed-off-by: Matei David <[email protected]> --------- Signed-off-by: Matei David <[email protected]>
- Loading branch information
1 parent
546e618
commit 894b508
Showing
4 changed files
with
152 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters