Documentation ¶
Overview ¶
Package featurens exposes functions to dynamically register methods for determining a namespace for features present in an image layer.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Detect ¶
Detect iterators through all registered Detectors and returns the first non-nil detected namespace.
func RegisterDetector ¶
RegisterDetector makes a detector available by the provided name.
If called twice with the same name, the name is blank, or if the provided Detector is nil, this function panics.
func RequiredFilenames ¶
func RequiredFilenames() (files []string)
RequiredFilenames returns the total list of files required for all registered Detectors.
Types ¶
type Detector ¶
type Detector interface { // Detect attempts to determine a Namespace from a FilesMap of an image // layer. Detect(tarutil.FilesMap) (*database.Namespace, error) // RequiredFilenames returns the list of files required to be in the FilesMap // provided to the Detect method. // // Filenames must not begin with "/". RequiredFilenames() []string }
Detector represents an ability to detect a namespace used for organizing features present in an image layer.
Directories ¶
Path | Synopsis |
---|---|
Package alpinerelease implements a featurens.Detector for Alpine Linux based container image layers.
|
Package alpinerelease implements a featurens.Detector for Alpine Linux based container image layers. |
Package aptsources implements a featurens.Detector for apt based container image layers.
|
Package aptsources implements a featurens.Detector for apt based container image layers. |
Package lsbrelease implements a featurens.Detector for container image layers containing an lsb-release file.
|
Package lsbrelease implements a featurens.Detector for container image layers containing an lsb-release file. |
Package osrelease implements a featurens.Detector for container image layers containing an os-release file.
|
Package osrelease implements a featurens.Detector for container image layers containing an os-release file. |
Package redhatrelease implements a featurens.Detector for container image layers containing an redhat-release-like files.
|
Package redhatrelease implements a featurens.Detector for container image layers containing an redhat-release-like files. |
Click to show internal directories.
Click to hide internal directories.