syzkaller: Index | Files

package db

import ""

Package db implements a simple key-value database. The database is cached in memory and mirrored on disk. It is used to store corpus in syz-manager and syz-hub. The database strives to minimize number of disk accesses as they can be slow in virtualized environments (GCE).


Package Files


func Create Uses

func Create(filename string, version uint64, records []Record) error

Create creates a new database in the specified file with the specified records.

func ReadCorpus Uses

func ReadCorpus(filename string, target *prog.Target) (progs []*prog.Prog, err error)

type DB Uses

type DB struct {
    Version uint64            // arbitrary user version (0 for new database)
    Records map[string]Record // in-memory cache, must not be modified directly
    // contains filtered or unexported fields

func Open Uses

func Open(filename string) (*DB, error)

func (*DB) BumpVersion Uses

func (db *DB) BumpVersion(version uint64) error

func (*DB) Delete Uses

func (db *DB) Delete(key string)

func (*DB) Flush Uses

func (db *DB) Flush() error

func (*DB) Save Uses

func (db *DB) Save(key string, val []byte, seq uint64)

type Record Uses

type Record struct {
    Val []byte
    Seq uint64

Package db imports 12 packages (graph) and is imported by 8 packages. Updated 2019-10-16. Refresh now. Tools for package owners.