-
Notifications
You must be signed in to change notification settings - Fork 95
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(map): Introduce GetMapsIDsByName #378
Conversation
Allow a user to get a list of maps IDs filtered by map name. Co-authored-by: Geyslan Gregório <geyslan@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.
LGTM 👏 Thanks for this great work! 🤗
log.Fatalf("the %s map with %d id was not found: %v", BPFMapNameToFind, id, err) | ||
} | ||
|
||
if bpfMap.Type() == BPFMapTypeToFind && |
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.
It is already really nice 👍 But do you think it's a good idea to identify map by flags?
IMO: In a real scenario, I will more based my search on flags rather types.
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.
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.
It will help a lot to have flags because I will need it for our project to identify the origin of maps 👍
I can take a look to implement this feature if it could help 😄
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.
I can take a look to implement this feature if it could help 😄
Awesome! ❤️
log.Fatalf("no %s maps with the same properties found", BPFMapNameToFind) | ||
} | ||
if len(similarMaps) > 1 { | ||
// This is a conundrum for the user, as they cannot decide which map to use |
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.
Flags can be the solution for this conundrum?
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.
It would help.
Great. I'm going to merge so we'll be able to improve it by implementing |
@aymericDD Thanks a million once again. |
Is it possible to release the library with this new feature? I want to use it for our project. Thanks 🙏 |
Let's cut it. 👍🏼 |
@aymericDD please update your project with https://github.com/aquasecurity/libbpfgo/releases/tag/v0.5.1-libbpf-1.2 |
Thanks a lot for your reactivity 🙏 |
commit 682f395 (HEAD -> feat/get-maps-by-name, origin/feat/get-maps-by-name)
Author: aymericdd aymeric.daurelle@datadoghq.com
Date: Tue Sep 12 16:28:43 2023 +0200