Documentation
¶
Index ¶
- func RunPerceptor()
- type HTTPResponder
- func (hr *HTTPResponder) AddImage(apiImage api.Image)
- func (hr *HTTPResponder) AddPod(apiPod api.Pod)
- func (hr *HTTPResponder) DeletePod(qualifiedName string)
- func (hr *HTTPResponder) Error(w http.ResponseWriter, r *http.Request, err error, statusCode int)
- func (hr *HTTPResponder) GetModel() string
- func (hr *HTTPResponder) GetNextImage() api.NextImage
- func (hr *HTTPResponder) GetScanResults() api.ScanResults
- func (hr *HTTPResponder) NotFound(w http.ResponseWriter, r *http.Request)
- func (hr *HTTPResponder) PostFinishScan(job api.FinishedScanClientJob)
- func (hr *HTTPResponder) SetConcurrentScanLimit(limit api.SetConcurrentScanLimit)
- func (hr *HTTPResponder) UpdateAllImages(allImages api.AllImages)
- func (hr *HTTPResponder) UpdateAllPods(allPods api.AllPods)
- func (hr *HTTPResponder) UpdatePod(apiPod api.Pod)
- type Perceptor
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RunPerceptor ¶ added in v0.0.10
func RunPerceptor()
Types ¶
type HTTPResponder ¶
type HTTPResponder struct {
AddPodChannel chan model.Pod
UpdatePodChannel chan model.Pod
DeletePodChannel chan string
AddImageChannel chan model.Image
AllPodsChannel chan []model.Pod
AllImagesChannel chan []model.Image
PostNextImageChannel chan func(*model.Image)
PostFinishScanJobChannel chan *a.FinishScanClient
SetConcurrentScanLimitChannel chan int
GetModelChannel chan func(json string)
GetScanResultsChannel chan func(scanResults api.ScanResults)
}
HTTPResponder ...
func NewHTTPResponder ¶
func NewHTTPResponder() *HTTPResponder
func (*HTTPResponder) AddImage ¶
func (hr *HTTPResponder) AddImage(apiImage api.Image)
func (*HTTPResponder) AddPod ¶
func (hr *HTTPResponder) AddPod(apiPod api.Pod)
func (*HTTPResponder) DeletePod ¶
func (hr *HTTPResponder) DeletePod(qualifiedName string)
func (*HTTPResponder) Error ¶
func (hr *HTTPResponder) Error(w http.ResponseWriter, r *http.Request, err error, statusCode int)
func (*HTTPResponder) GetModel ¶
func (hr *HTTPResponder) GetModel() string
func (*HTTPResponder) GetNextImage ¶
func (hr *HTTPResponder) GetNextImage() api.NextImage
func (*HTTPResponder) GetScanResults ¶
func (hr *HTTPResponder) GetScanResults() api.ScanResults
GetScanResults returns results for:
- all images that have a scan status of complete
- all pods for which all their images have a scan status of complete
func (*HTTPResponder) NotFound ¶
func (hr *HTTPResponder) NotFound(w http.ResponseWriter, r *http.Request)
func (*HTTPResponder) PostFinishScan ¶
func (hr *HTTPResponder) PostFinishScan(job api.FinishedScanClientJob)
func (*HTTPResponder) SetConcurrentScanLimit ¶ added in v0.0.7
func (hr *HTTPResponder) SetConcurrentScanLimit(limit api.SetConcurrentScanLimit)
func (*HTTPResponder) UpdateAllImages ¶ added in v0.0.7
func (hr *HTTPResponder) UpdateAllImages(allImages api.AllImages)
func (*HTTPResponder) UpdateAllPods ¶
func (hr *HTTPResponder) UpdateAllPods(allPods api.AllPods)
func (*HTTPResponder) UpdatePod ¶
func (hr *HTTPResponder) UpdatePod(apiPod api.Pod)
type Perceptor ¶
type Perceptor struct {
// contains filtered or unexported fields
}
Perceptor ties together: a cluster, scan clients, and a hub. It listens to the cluster to learn about new pods. It keeps track of pods, containers, images, and scan results in a model. It has the hub scan images that have never been seen before. It grabs the scan results from the hub and adds them to its model. It publishes vulnerabilities that the cluster can find out about.
func NewMockedPerceptor ¶
NewMockedPerceptor creates a Perceptor which uses a mock hub
Click to show internal directories.
Click to hide internal directories.