cache

package
v0.0.4-0...-df3dcca Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 26, 2023 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Clean

func Clean(profs, cached profiles.ProfMap) error

Clean removes unnecessary cache entries for various profiles

func CleanDirs

func CleanDirs() error

CleanDirs cleans outdated directories

func CurrentDir

func CurrentDir() (string, error)

CurrentDir returns the path of the current cache directory.

func DeleteAll

func DeleteAll(name string, entries []profiles.Entry) error

DeleteAll removes all of the cache entries for this profile

func DeleteOlder

func DeleteOlder(name string, newest profiles.Entry, entries []profiles.Entry) error

DeleteOlder removes all but the most recent cache entries for this profile

func FindNewest

func FindNewest(entries []profiles.Entry) profiles.Entry

FindNewest gets the newest entry in the list of entries

func Init

func Init() error

Init initializes the cache directory.

func Load

func Load() error

Load reloads the AppArmor cache into the kernel module

func Scan

func Scan() (profiles.ProfMap, error)

Scan finds all of the currently cached profiles

func ScanDirs

func ScanDirs() ([]string, error)

ScanDirs returns all the currently cached directories.

func Update

func Update() error

Update rebuilds all of the profiles in the cache and cleans up the cache

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL