Documentation ¶
Index ¶
Constants ¶
View Source
const ( // StateInitialize in this state the handler will initialize the job context. StateInitialize = "initialize" // StateScanLayer in this state the handler will POST layer of clair to scan layer by layer of the image. StateScanLayer = "scanlayer" // StateSummarize in this state, the layers are scanned by clair it will call clair API to update vulnerability overview in Harbor DB. After this state, the job is finished. StateSummarize = "summarize" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Initializer ¶
type Initializer struct {
Context *JobContext
}
Initializer will handle the initialise state pull the manifest, prepare token.
type JobContext ¶
type JobContext struct { JobID int64 Repository string Tag string Digest string Logger *log.Logger // contains filtered or unexported fields }
JobContext is for sharing data across handlers in a execution of a scan job.
type LayerScanHandler ¶
type LayerScanHandler struct {
Context *JobContext
}
LayerScanHandler will call clair API to trigger scanning.
type SummarizeHandler ¶
type SummarizeHandler struct {
Context *JobContext
}
SummarizeHandler will summarize the vulnerability and feature information of Clair, and store into Harbor's DB.
Click to show internal directories.
Click to hide internal directories.