db

package
v0.9.0 Latest Latest
Warning

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

Go to latest
Published: Apr 9, 2026 License: BSD-3-Clause, GPL-3.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// VulnerabilitiesIndex is the handle to the bleve database for vulnerability information
	VulnerabilitiesIndex bleve.Index

	// ExploitsIndex is the handle to the bleve database for exploit information
	ExploitsIndex bleve.Index

	// VulnerabilityDBName is the name of the database directory on disk
	VulnerabilityDBName = "nvd.bleve"

	// BleveOpenTimeout controls how long to wait for a bleve database to open
	// before returning an error. This prevents indefinite blocking when the
	// underlying BoltDB file is locked by another process (e.g. concurrent test runs).
	BleveOpenTimeout = 10 * time.Second
)

Functions

func CloseBleve

func CloseBleve(index io.Closer)

CloseBleve is a simple wrapper for the bleve close call it's used to log any close operations.

func OpenBleve

func OpenBleve(path string) (bleve.Index, error)

OpenBleve is a wrapper for the bleve open call with a timeout. It prevents indefinite blocking when the BoltDB file is locked by another process (e.g. when running tests concurrently).

func SetLogger

func SetLogger(l *zap.Logger)

SetLogger will set the logger for this package.

Types

This section is empty.

Jump to

Keyboard shortcuts

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