-
Notifications
You must be signed in to change notification settings - Fork 13
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
feat(store): replace all 4 objects maps with gokv.Store abstraction #177
Conversation
89b7d92
to
9c7d643
Compare
Codecov Report
@@ Coverage Diff @@
## main #177 +/- ##
==========================================
- Coverage 65.21% 58.34% -6.87%
==========================================
Files 19 20 +1
Lines 1374 1575 +201
==========================================
+ Hits 896 919 +23
- Misses 434 570 +136
- Partials 44 86 +42
|
4c96492
to
4283e5a
Compare
@glimchb I think that the chosen library |
pkg/evpn/port_test.go
Outdated
options := gomap.DefaultOptions | ||
options.Codec = utils.ProtoCodec{} | ||
store := gomap.NewStore(options) | ||
opi := NewServerWithArgs(mockNetlink, store) |
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.
Bit of repetition here, could this be extracted to a function? Same across the rest of the test packages.
98cfbf6
to
3eb53e3
Compare
ok, my oversight. messed up with repository and referred to https://github.com/yifeng01/gokv |
f33dc94
to
2fd5fd6
Compare
Signed-off-by: Boris Glimcher <[email protected]>
Signed-off-by: Boris Glimcher <[email protected]>
Signed-off-by: Boris Glimcher <[email protected]>
Signed-off-by: Boris Glimcher <[email protected]>
Signed-off-by: Boris Glimcher <[email protected]>
until gokv implements GetAll() interface added volatile helper for listing of keys Signed-off-by: Boris Glimcher <[email protected]>
Signed-off-by: Boris Glimcher <[email protected]>
Pagination map[string]int | ||
ListHelper map[string]bool |
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.
@glimchb since ListHelper
is used as a set, it is more optimal to use struct{}
as a value to save up 1 byte per entry (empty struct occupies 0 bytes).
see https://github.com/philippgille/gokv
Signed-off-by: Boris Glimcher [email protected]