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

cache: rework snapshot api #484

Merged
merged 4 commits into from
Aug 31, 2021
Merged

cache: rework snapshot api #484

merged 4 commits into from
Aug 31, 2021

Conversation

alecholmez
Copy link
Contributor

@alecholmez alecholmez commented Aug 4, 2021

reworks cache api so we no longer need to change function signatures when adding support for new xDS services

@alecholmez alecholmez assigned alecholmez and snowp and unassigned alecholmez Aug 4, 2021
pkg/cache/v3/snapshot.go Outdated Show resolved Hide resolved
Signed-off-by: Alec Holmes <[email protected]>
pkg/cache/v3/resources.go Outdated Show resolved Hide resolved
pkg/cache/v3/resources.go Outdated Show resolved Hide resolved
pkg/cache/v3/snapshot.go Outdated Show resolved Hide resolved
pkg/resource/v3/resource.go Outdated Show resolved Hide resolved
pkg/resource/v3/resource.go Show resolved Hide resolved
pkg/cache/v3/snapshot.go Outdated Show resolved Hide resolved
@alecholmez
Copy link
Contributor Author

@jpeach ended up aliasing to string instead of creating a whole new type. Now a lot of the snapshot stuff asks for a resource.Type as a param

pkg/resource/v3/resource.go Outdated Show resolved Hide resolved
Copy link
Contributor

@snowp snowp left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks this seems to be a great improvement, just some minor comments

pkg/cache/v3/snapshot.go Outdated Show resolved Hide resolved
pkg/cache/v3/snapshot.go Outdated Show resolved Hide resolved
@alecholmez
Copy link
Contributor Author

alecholmez commented Aug 17, 2021

@snowp just pushed that last change. NewSnapshot() now returns an error

Signed-off-by: Alec Holmes <[email protected]>
@alecholmez alecholmez requested a review from snowp August 17, 2021 18:46
@alecholmez
Copy link
Contributor Author

@snowp can we merge this?

Copy link
Contributor

@snowp snowp left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks!

@alecholmez alecholmez merged commit 4ca66c8 into main Aug 31, 2021
@alecholmez alecholmez deleted the snapshot_api branch August 31, 2021 18:01
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

Successfully merging this pull request may close these issues.

3 participants