store

package
v0.0.0-...-19e16ce Latest Latest
Warning

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

Go to latest
Published: Dec 5, 2018 License: Apache-2.0 Imports: 16 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewInMemoryStore

func NewInMemoryStore() record.Store

NewInMemoryStore returns a new memory-backed Store that can be used for storing fingerprints being scanned. It is valid until the process exits and is not automaticall persisted to disk.

func RestoreRememberedObjects

func RestoreRememberedObjects() record.Store

RestoreRememberedObjects loads a persisted database from disk

Types

type CachedStatFingerprintKey

type CachedStatFingerprintKey string

CachedStatFingerprintKey is an opaque key generated from the stat info of a file.

type SerializedCache

type SerializedCache struct {
	Fingerprints []record.SerializedFingerprint
	Files        []record.SerializedFile
	Archives     []record.SerializedArchiveFile
	Repos        []record.SerializedGitRepo
	StatCache    map[CachedStatFingerprintKey]uint64
}

SerializedCache is an alternative representation of fingerprintInMemoryCache that uses numeric IDs in place of pointers. Other than creating the serialized struct from an existing fingerprintInMemoryCache, it is directly serializable using the defaults for more or less any encoding format desired

Jump to

Keyboard shortcuts

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