Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CleanTempDir ¶
func CleanTempDir(ctx logContext.Context) error
CleanTempDir removes orphaned temp directories that do not contain running PID values.
func MkdirTemp ¶
MkdirTemp returns a temporary directory path formatted as: trufflehog-<pid>-<randint>
func RunCleanupLoop ¶ added in v3.63.2
func RunCleanupLoop(ctx logContext.Context)
RunCleanupLoop runs a loop that cleans up orphaned directories every 15 seconds
Types ¶
type CleanTemp ¶
type CleanTemp interface { // CleanTempDir removes orphaned directories from sources. ex: Git CleanTempDir(ctx logContext.Context, dirName string, pid int) error // CleanTempFiles removes orphaned files/artifacts from sources. ex: Artifactory CleanTempFiles(ctx context.Context, fileName string, pid int) error }
CleanTemp is used to remove orphaned artifacts from aborted scans.
Click to show internal directories.
Click to hide internal directories.