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

kuma-cp: add generic versioner for xDS resources #529

Merged
merged 2 commits into from
Jan 10, 2020

Conversation

yskopets
Copy link
Contributor

@yskopets yskopets commented Jan 8, 2020

Summary

  • add generic versioner for xDS resources

@yskopets yskopets requested review from a team and jakubdyszkiewicz January 8, 2020 13:40
@yskopets yskopets added this to the 0.4.0 milestone Jan 8, 2020
@yskopets yskopets force-pushed the feature/generic-snapshot-versioner branch from 8ea5b6f to 253a67e Compare January 8, 2020 13:50
Copy link
Contributor

@jakubdyszkiewicz jakubdyszkiewicz left a comment

Choose a reason for hiding this comment

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

What do you think about more immutable version of this? In my opinion - the less mutability the easier is to reason about code. How about Version() instead of modifing snapshot, would return map[type]version which is then applied on snapshot outside of this method?

@yskopets yskopets force-pushed the feature/generic-snapshot-versioner branch from 253a67e to e38420b Compare January 10, 2020 11:12
@yskopets yskopets changed the base branch from feature/custom-snapshot-cache to master January 10, 2020 11:12
@yskopets
Copy link
Contributor Author

@jakubdyszkiewicz I've changed Versioner interface to

// SnapshotVersioner assigns versions to xDS resources in a new Snapshot.
type SnapshotVersioner interface {
	Version(new, old Snapshot) Snapshot
}

Copy link
Contributor

@jakubdyszkiewicz jakubdyszkiewicz left a comment

Choose a reason for hiding this comment

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

thanks

@yskopets yskopets merged commit b5d645c into master Jan 10, 2020
@devadvocado devadvocado deleted the feature/generic-snapshot-versioner branch March 30, 2020 13:15
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.

None yet

2 participants