-
Notifications
You must be signed in to change notification settings - Fork 2.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ctmap: make PerClusterCTMap.getClusterMap return error for nonexisten…
…t map By changing the underlying map abstraction to cilium/ebpf, opening a map from a pin no longer returns an error chain containing a os.PathError, only a unix.ENOENT. Return errors from getClusterMap() instead of a vague 'nil, nil'. Check for ENOENT in getAllClusterMaps() instead of checking the first return value. Stop checking the first return value in multiple places. Also removed redundant mapType argument from PerClusterCTMap.newInnerMap(). Update tests to perform error checking first before accessing any other return value. Signed-off-by: Timo Beckers <timo@isovalent.com>
- Loading branch information
Showing
4 changed files
with
22 additions
and
35 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters