Documentation
¶
Index ¶
Constants ¶
View Source
const ( PerceptorBaseURL = "http://perceptor" // perceptor-scanner paths NextImagePath = "nextimage" FinishedScanPath = "finishedscan" // perceiver paths PodPath = "pod" ImagePath = "image" ScanResultsPath = "scanresults" AllPodsPath = "allpods" // ports (basically so that you can run these locally without them stomping on each other -- for testing) PerceptorPort = "3001" PerceiverPort = "3002" PerceptorScannerPort = "3003" )
Three things that should work: curl -X GET http://perceptor.bds-perceptor.svc.cluster.local:3001/metrics curl -X GET http://perceptor.bds-perceptor:3001/metrics curl -X GET http://perceptor:3001/metrics
Variables ¶
This section is empty.
Functions ¶
func SetupHTTPServer ¶
func SetupHTTPServer(responder Responder)
Types ¶
type Container ¶ added in v0.0.3
func NewContainer ¶ added in v0.0.3
type FinishedScanClientJob ¶
type ImageSpec ¶ added in v0.0.5
type Responder ¶
type Responder interface {
// state of the program
// this is a funky return type because it's so tightly coupled to prometheus
GetMetrics(w http.ResponseWriter, r *http.Request)
GetModel() string
// perceiver
AddPod(pod Pod)
UpdatePod(pod Pod)
DeletePod(qualifiedName string)
GetScanResults() ScanResults
AddImage(image Image)
UpdateAllPods(allPods AllPods)
// scanner
GetNextImage(func(nextImage NextImage))
PostFinishScan(job FinishedScanClientJob)
// errors
NotFound(w http.ResponseWriter, r *http.Request)
Error(w http.ResponseWriter, r *http.Request, err error, statusCode int)
}
type ScanResults ¶
type ScanResults struct {
Pods []ScannedPod
Images []ScannedImage
}
func NewScanResults ¶
func NewScanResults(pods []ScannedPod, images []ScannedImage) *ScanResults
type ScannedImage ¶ added in v0.0.3
Click to show internal directories.
Click to hide internal directories.