Documentation
¶
Overview ¶
Package stats contains interfaces and utilities relating to the collection of statistics from Scalibr.
Index ¶
- type Collector
- type NoopCollector
- func (c NoopCollector) AfterDetectorRun(name string, runtime time.Duration, err error)
- func (c NoopCollector) AfterExtractorRun(name string, runtime time.Duration, err error)
- func (c NoopCollector) AfterInodeVisited(path string)
- func (c NoopCollector) AfterResultsExported(destination string, bytes int, err error)
- func (c NoopCollector) AfterScan(runtime time.Duration, status *plugin.ScanStatus)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Collector ¶
type Collector interface {
AfterInodeVisited(path string)
AfterExtractorRun(name string, runtime time.Duration, err error)
AfterDetectorRun(name string, runtime time.Duration, err error)
AfterScan(runtime time.Duration, status *plugin.ScanStatus)
// AfterResultsExported is called after results have been exported. destination should merely be
// a category of where the result was written to (e.g. 'file', 'http'), not the precise location.
AfterResultsExported(destination string, bytes int, err error)
}
Collector is a component which is notified when certain events occur. It can be implemented with different metric backends to enable monitoring of Scalibr.
type NoopCollector ¶
type NoopCollector struct{}
NoopCollector implements Collector by doing nothing.
func (NoopCollector) AfterDetectorRun ¶
func (c NoopCollector) AfterDetectorRun(name string, runtime time.Duration, err error)
AfterDetectorRun implements Collector by doing nothing.
func (NoopCollector) AfterExtractorRun ¶
func (c NoopCollector) AfterExtractorRun(name string, runtime time.Duration, err error)
AfterExtractorRun implements Collector by doing nothing.
func (NoopCollector) AfterInodeVisited ¶
func (c NoopCollector) AfterInodeVisited(path string)
AfterInodeVisited implements Collector by doing nothing.
func (NoopCollector) AfterResultsExported ¶
func (c NoopCollector) AfterResultsExported(destination string, bytes int, err error)
AfterResultsExported implements Collector by doing nothing.
func (NoopCollector) AfterScan ¶
func (c NoopCollector) AfterScan(runtime time.Duration, status *plugin.ScanStatus)
AfterScan implements Collector by doing nothing.
Click to show internal directories.
Click to hide internal directories.