Documentation ¶
Index ¶
- Constants
- Variables
- func ProcessLayer(datastore database.Datastore, imageFormat, name, parentName, path string, ...) error
- func RunNotifier(config *notification.Config, datastore database.Datastore, ...)
- func RunUpdater(config *UpdaterConfig, datastore database.Datastore, st *stopper.Stopper)
- type UpdaterConfig
Constants ¶
View Source
const ( // Version (integer) represents the worker version. // Increased each time the engine changes. Version = 3 )
Variables ¶
View Source
var ( // ErrUnsupported is the error that should be raised when an OS or package // manager is not supported. ErrUnsupported = commonerr.NewBadRequestError("worker: OS and/or package manager are not supported") // ErrParentUnknown is the error that should be raised when a parent layer // has yet to be processed for the current layer. ErrParentUnknown = commonerr.NewBadRequestError("worker: parent layer is unknown, it must be processed first") )
Functions ¶
func ProcessLayer ¶
func ProcessLayer(datastore database.Datastore, imageFormat, name, parentName, path string, headers map[string]string) error
ProcessLayer detects the Namespace of a layer, the features it adds/removes, and then stores everything in the database.
TODO(Quentin-M): We could have a goroutine that looks for layers that have been analyzed with an older engine version and that processes them.
func RunNotifier ¶
func RunNotifier(config *notification.Config, datastore database.Datastore, stopper *stopper.Stopper)
RunNotifier begins a process that checks for new notifications that should be sent out to third parties.
func RunUpdater ¶
func RunUpdater(config *UpdaterConfig, datastore database.Datastore, st *stopper.Stopper)
RunUpdater begins a process that updates the vulnerability database at regular intervals.
Types ¶
type UpdaterConfig ¶
UpdaterConfig is the configuration for the Updater service.
Directories ¶
Path | Synopsis |
---|---|
v1
Package v1 implements the first version of the Clair API.
|
Package v1 implements the first version of the Clair API. |
cmd
|
|
Package database defines the Clair's models and a common interface for database implementations.
|
Package database defines the Clair's models and a common interface for database implementations. |
pgsql
Package pgsql implements database.Datastore with PostgreSQL.
|
Package pgsql implements database.Datastore with PostgreSQL. |
pgsql/migrations
Package migrations regroups every migrations available to the pgsql database backend.
|
Package migrations regroups every migrations available to the pgsql database backend. |
ext
|
|
featurefmt
Package featurefmt exposes functions to dynamically register methods for determining the features present in an image layer.
|
Package featurefmt exposes functions to dynamically register methods for determining the features present in an image layer. |
featurefmt/apk
Package apk implements a featurefmt.Lister for APK packages.
|
Package apk implements a featurefmt.Lister for APK packages. |
featurefmt/dpkg
Package dpkg implements a featurefmt.Lister for dpkg packages.
|
Package dpkg implements a featurefmt.Lister for dpkg packages. |
featurefmt/rpm
Package rpm implements a featurefmt.Lister for rpm packages.
|
Package rpm implements a featurefmt.Lister for rpm packages. |
featurens
Package featurens exposes functions to dynamically register methods for determining a namespace for features present in an image layer.
|
Package featurens exposes functions to dynamically register methods for determining a namespace for features present in an image layer. |
featurens/alpinerelease
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. |
featurens/aptsources
Package aptsources implements a featurens.Detector for apt based container image layers.
|
Package aptsources implements a featurens.Detector for apt based container image layers. |
featurens/lsbrelease
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. |
featurens/osrelease
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. |
featurens/redhatrelease
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. |
imagefmt
Package imagefmt exposes functions to dynamically register methods to detect different types of container image formats.
|
Package imagefmt exposes functions to dynamically register methods to detect different types of container image formats. |
imagefmt/aci
Package aci implements an imagefmt.Extractor for appc formatted container image layers.
|
Package aci implements an imagefmt.Extractor for appc formatted container image layers. |
imagefmt/docker
Package docker implements an imagefmt.Extractor for docker formatted container image layers.
|
Package docker implements an imagefmt.Extractor for docker formatted container image layers. |
notification
Package notification exposes functions to dynamically register methods to deliver notifications from the Clair database.
|
Package notification exposes functions to dynamically register methods to deliver notifications from the Clair database. |
notification/webhook
Package webhook implements a notification sender for HTTP JSON webhooks.
|
Package webhook implements a notification sender for HTTP JSON webhooks. |
versionfmt
Package versionfmt exposes functions to dynamically register formats used to parse Feature Versions.
|
Package versionfmt exposes functions to dynamically register formats used to parse Feature Versions. |
versionfmt/dpkg
Package dpkg implements a versionfmt.Parser for version numbers used in dpkg based software packages.
|
Package dpkg implements a versionfmt.Parser for version numbers used in dpkg based software packages. |
versionfmt/rpm
Package rpm implements a versionfmt.Parser for version numbers used in rpm based software packages.
|
Package rpm implements a versionfmt.Parser for version numbers used in rpm based software packages. |
vulnmdsrc
Package vulnmdsrc exposes functions to dynamically register vulnerability metadata sources used to update a Clair database.
|
Package vulnmdsrc exposes functions to dynamically register vulnerability metadata sources used to update a Clair database. |
vulnmdsrc/nvd
Package nvd implements a vulnerability metadata appender using the NIST NVD database.
|
Package nvd implements a vulnerability metadata appender using the NIST NVD database. |
vulnsrc
Package vulnsrc exposes functions to dynamically register vulnerability sources used to update a Clair database.
|
Package vulnsrc exposes functions to dynamically register vulnerability sources used to update a Clair database. |
vulnsrc/alpine
Package alpine implements a vulnerability source updater using the alpine-secdb git repository.
|
Package alpine implements a vulnerability source updater using the alpine-secdb git repository. |
vulnsrc/debian
Package debian implements a vulnerability source updater using the Debian Security Tracker.
|
Package debian implements a vulnerability source updater using the Debian Security Tracker. |
vulnsrc/oracle
Package oracle implements a vulnerability source updater using the Oracle Linux OVAL Database.
|
Package oracle implements a vulnerability source updater using the Oracle Linux OVAL Database. |
vulnsrc/rhel
Package rhel implements a vulnerability source updater using the Red Hat Linux OVAL Database.
|
Package rhel implements a vulnerability source updater using the Red Hat Linux OVAL Database. |
vulnsrc/ubuntu
Package ubuntu implements a vulnerability source updater using the Ubuntu CVE Tracker.
|
Package ubuntu implements a vulnerability source updater using the Ubuntu CVE Tracker. |
pkg
|
|
commonerr
Package commonerr defines reusable error types common throughout the Clair codebase.
|
Package commonerr defines reusable error types common throughout the Clair codebase. |
httputil
Package httputil implements common HTTP functionality used throughout the Clair codebase.
|
Package httputil implements common HTTP functionality used throughout the Clair codebase. |
tarutil
Package tarutil implements some tar utility functions.
|
Package tarutil implements some tar utility functions. |
timeutil
Package timeutil provides time utility functions.
|
Package timeutil provides time utility functions. |
Click to show internal directories.
Click to hide internal directories.