core

package
v0.0.16 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 3, 2018 License: Apache-2.0 Imports: 13 Imported by: 2

Documentation

Index

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

func NewMockedPerceptor() (*Perceptor, error)

NewMockedPerceptor creates a Perceptor which uses a mock hub

func NewPerceptor

func NewPerceptor(config *model.Config) (*Perceptor, error)

NewPerceptor creates a Perceptor using a real hub client.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL