gcsloader

package
v0.0.0-...-03d6fc4 Latest Latest
Warning

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

Go to latest
Published: Jan 23, 2019 License: BSD-3-Clause Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func LoadFromBoltDB

func LoadFromBoltDB(pool *fuzzpool.FuzzPool, cache *fuzzcache.FuzzReportCache) error

LoadFromBoltDB fills the given *fuzzpool.FuzzPool from FuzzReportCache associated with the given

hash. The data.FuzzReports will all be in the current part of the pool.

If a cache for the commit does not exist, or there are other problems with the retrieval, an error is returned. We do not need to deduplicate on extraction because the fuzzes were deduplicated on storage.

Types

type GCSLoader

type GCSLoader struct {
	Cache *fuzzcache.FuzzReportCache
	Pool  *fuzzpool.FuzzPool
	// contains filtered or unexported fields
}

GCSLoader is a struct that handles downloading fuzzes from Google Storage.

func New

New creates a GCSLoader and returns it.

func (*GCSLoader) LoadFreshFromGoogleStorage

func (g *GCSLoader) LoadFreshFromGoogleStorage() error

LoadFreshFromGoogleStorage pulls all bad and grey fuzzes out of GCS and loads them into memory. The "fresh" in the name refers to the fact that all other loaded fuzzes (if any) are written over, including in the cache. Upon completion, the full results are cached to a boltDB instance and moved from staging to the current copy.

func (*GCSLoader) LoadFuzzesFromGoogleStorage

func (g *GCSLoader) LoadFuzzesFromGoogleStorage(whitelist []string) error

LoadFuzzesFromGoogleStorage pulls all fuzzes out of GCS that are on the given whitelist and loads them into memory (as staging). These fuzzes represent the newly found bad fuzzes that have been uploaded by the various generators/aggregators. After loading them, it updates the cache and moves them from staging to the current copy.

Jump to

Keyboard shortcuts

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