libvuln

package
v0.0.4 Latest Latest
Warning

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

Go to latest
Published: Nov 15, 2019 License: Apache-2.0 Imports: 18 Imported by: 7

Documentation

Overview

Package libvuln is a generated GoMock package.

Index

Constants

View Source
const (
	DefaultUpdateInterval         = 30 * time.Minute
	DefaultUpdaterInitConcurrency = 10
)

Variables

This section is empty.

Functions

This section is empty.

Types

type DataStore

type DataStore string

DataStore tells libvuln which backing persistence store to instantiate

const (
	Postgres DataStore = "postgres"
)

type Libvuln

type Libvuln interface {
	Scan(ctx context.Context, sr *claircore.ScanReport) (*claircore.VulnerabilityReport, error)
}

Libvuln is an interface exporting the public methods of our library.

func New

func New(ctx context.Context, opts *Opts) (Libvuln, error)

New creates a new instance of the Libvuln library

type MockLibvuln

type MockLibvuln struct {
	// contains filtered or unexported fields
}

MockLibvuln is a mock of Libvuln interface

func NewMockLibvuln

func NewMockLibvuln(ctrl *gomock.Controller) *MockLibvuln

NewMockLibvuln creates a new mock instance

func (*MockLibvuln) EXPECT

func (m *MockLibvuln) EXPECT() *MockLibvulnMockRecorder

EXPECT returns an object that allows the caller to indicate expected use

func (*MockLibvuln) Scan

Scan mocks base method

type MockLibvulnMockRecorder

type MockLibvulnMockRecorder struct {
	// contains filtered or unexported fields
}

MockLibvulnMockRecorder is the mock recorder for MockLibvuln

func (*MockLibvulnMockRecorder) Scan

func (mr *MockLibvulnMockRecorder) Scan(arg0, arg1 interface{}) *gomock.Call

Scan indicates an expected call of Scan

type Opts

type Opts struct {
	// the datastore implementation libvuln should instantiate
	DataStore DataStore
	// the maximum size of the connection pool used by the database
	MaxConnPool int32
	// the connectiong string to the above data store implementation
	ConnString string
	// the update lock (distlock) implementation libvuln should instantiate
	UpdateLock UpdateLock
	// returns the matchers to be used during libvuln runtime
	Matchers []driver.Matcher
	// returns the updaters to run on an interval
	Updaters []driver.Updater
	// the interval at which updaters will update the vulnstore
	UpdateInterval time.Duration
	// number of updaters ran in parallel while libscan initializes. use this to tune io/cpu on library start when using many updaters
	UpdaterInitConcurrency int
}

func (*Opts) Parse

func (o *Opts) Parse() error

type UpdateLock

type UpdateLock string

ScanLock tells libscan which distributed locking implementation to use

const (
	PostgresSL UpdateLock = "postgres"
)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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