-
Notifications
You must be signed in to change notification settings - Fork 8
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
Sai/merged sets #535
Sai/merged sets #535
Conversation
@@ -240,7 +240,183 @@ func (s *{{ $kindLowerCamel }}Set) Clone() {{ $resource.Kind }}Set { | |||
if s == nil { | |||
return nil | |||
} | |||
return &{{ $kindLowerCamel }}Set{set: sksets.NewResourceSet(s.Generic().Clone().List()...)} | |||
return &{{ $kindLowerCamel }}MergedSet{sets: []sksets.ResourceSet{s.Generic()}} |
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.
This is the main effective change, clone now produces a merged set, which is a a list of sets which is iterated through on methods like Find
or List
pkg/ezkube/resource_id.go
Outdated
@@ -152,6 +153,37 @@ func KeyWithSeparator(id ResourceId, separator string) string { | |||
return b.String() | |||
} | |||
|
|||
func HashedKeyWithSeparator(id ResourceId, separator string) uint64 { |
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.
Using a uint64 for the key may reduce key building time and gc time
Description
Please include a thorough summary of the changes.
This fixes ... \ This new feature can be used to ...
Context
Summary of issue
Description and justification of any interesting decisions made