Documentation ¶
Overview ¶
Package featurens exposes functions to dynamically register methods for determining a namespace for features present in an image layer.
Index ¶
- func Detect(files tarutil.FilesMap, toUse []database.Detector) ([]database.LayerNamespace, error)
- func ListDetectors() []database.Detector
- func RegisterDetector(name string, version string, d Detector)
- func RequiredFilenames(toUse []database.Detector) (files []string)
- func TestDetector(t *testing.T, d Detector, testData []TestData)
- type Detector
- type TestData
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ListDetectors ¶
ListDetectors returns the info of all registered namespace detectors.
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 ¶
RequiredFilenames returns all file patterns that will be passed to the given extensions. These patterns are expressed as regexps. Any extension metadata that has non namespace-detector type will be skipped.
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 a list of patterns for filenames that will // be in the FilesMap provided to the Detect method. // // The patterns are expressed as regexps, and will be matched against // full paths that do not include the leading "/". 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. |