Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Analytics ¶
type Analytics interface {
TrackScan(bool, ScanMetrics)
}
Analytics exposes different metric tracking functions.
type ErrorReporter ¶ added in v0.3.0
type Instrumentor ¶
type Instrumentor interface { StartSpan(ctx context.Context, operation string) Span NewTransaction( ctx context.Context, txName string, operation string, ) Span Finish(span Span) }
Instrumentor exposes functions used for adding instrumentation context to functions.
type ScanMetrics ¶
type ScanMetrics struct {
// contains filtered or unexported fields
}
ScanMetrics contains various metrics about the Snyk Code scan.
func NewScanMetrics ¶
func NewScanMetrics(lastScanStartTime time.Time, lastScanFileCount int) ScanMetrics
NewScanMetrics is used to create a ScanMetrics object.
func (ScanMetrics) GetDuration ¶
func (s ScanMetrics) GetDuration() time.Duration
GetDuration computes the duration since the last time a scan starter.
func (ScanMetrics) GetLastScanFileCount ¶
func (s ScanMetrics) GetLastScanFileCount() int
GetLastScanFileCount returns the count of files since the last scan.
func (*ScanMetrics) SetLastScanFileCount ¶
func (s *ScanMetrics) SetLastScanFileCount(lastScanFileCount int)
SetLastScanFileCount sets the count of files since the last scan.
type Span ¶
type Span interface { SetTransactionName(name string) StartSpan(ctx context.Context) Finish() GetOperation() string GetTxName() string // GetTraceId Returns UUID of the trace GetTraceId() string Context() context.Context GetDurationMs() int64 }
Span exposes functions that have context about functions.
Click to show internal directories.
Click to hide internal directories.