Documentation ¶
Index ¶
- Variables
- func ConvertInputToFilesystem(ctx context.Context, sourceType kubeclarityutils.SourceType, userInput string) (string, func(), error)
- func DirSizeMB(path string) (int64, error)
- func GetInputSize(input types.Input) (int64, error)
- func RemoveMountPathSubStringIfNeeded(toTrim string, mountPath string) string
- func ShouldStripInputPath(inputShouldStrip *bool, familyShouldStrip bool) bool
- func TrimMountPath(toTrim string, mountPath string) string
Constants ¶
This section is empty.
Variables ¶
View Source
var ContainerRootfsCache *containerrootfs.Cache
ContainerRootfsCache is the container root fs conversion cache that will be used by all the scanners which call ConvertInputToFilesystem.
TODO(sambetts) Stop using a global cache object when once we have support for context.Context in the scanner infrastructure. Once that happens we can pass it down from the family manager to the scanners.
View Source
var InputSizesCache = make(map[string]int64)
InputSizesCache global cache of already calculated input sizes. If input type is a DIR/ROOTFS/FILE than the key is the input path.
Functions ¶
func ConvertInputToFilesystem ¶
func ConvertInputToFilesystem(ctx context.Context, sourceType kubeclarityutils.SourceType, userInput string) (string, func(), error)
func ShouldStripInputPath ¶
func TrimMountPath ¶
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.