-
Notifications
You must be signed in to change notification settings - Fork 485
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
SVID count update #5352
SVID count update #5352
Conversation
Signed-off-by: FedeNQ <fedenahuel07@gmail.com>
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.
Thank you @FedeNQ, it's looking great!
@@ -250,6 +250,10 @@ func (c *Cache) GetStaleEntries() []*cache.StaleEntry { | |||
return staleEntries | |||
} | |||
|
|||
func (c *Cache) CountX509SVIDs() int { | |||
return len(c.records) |
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.
We should lock the mutex for reading to get the length of the records.
return len(c.records) | |
c.mtx.RLock() | |
defer c.mtx.RUnlock() | |
return len(c.records) |
// CountJWTSVIDs returns the amount of JWT SVIDs on memory | ||
CountJWTSVIDs() int | ||
|
||
CountSVIDStoreX509SVIDs() int |
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.
nit: Add a descriptive comment here as we have for the other counts.
Signed-off-by: FedeNQ <fedenahuel07@gmail.com>
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.
Thank you @FedeNQ!
Pull Request check list
Affected functionality
Description of change
Add 3 new variables replacing svids_count, that will be deprecated.
Variables added:
Which issue this PR fixes
fixes #3256