fsscan

package
v1.3.2 Latest Latest
Warning

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

Go to latest
Published: Dec 23, 2024 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// special error to inidicate that fileystem scanning found a file that
	// matches the container id, without, however, matching the pod id.
	ErrContainerPathWithoutMatchingPodID = errors.New("found cgroup file that matches the container id, but not the pod id")
)

Functions

This section is empty.

Types

type FsScanner

type FsScanner interface {
	// FindContainer returns:
	//   path, nil: if the container cgroup was found
	//   path, ErrContainerPathWithoutMatchingPodID: if the container cgroup was found, but the pod id did not match the parent directory
	//   "", err: if the container cgroup was not found.
	//
	// NB: FindContainerPath returns ErrContainerPathWithoutMatchingPodID only if the directory
	// matching the pod id did not existed in the fs.
	//
	// Callers need to serialize concurrent access to this function on their own.
	FindContainerPath(podID uuid.UUID, containerID string) (string, error)
}

FsScanner is a utility for scanning the filesystem to find container cgroup directories.

func New

func New() FsScanner

Jump to

Keyboard shortcuts

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