Documentation ¶
Index ¶
Constants ¶
View Source
const (
KeyLength = 32 // Total bytes used for keys
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type KeyValueDB ¶
type KeyValueDB interface { Close() error // Returns an error if the close fails InitDB(filepath string) error // Sets up the database, returns error if it fails Get(key [KeyLength]byte) (value []byte) // Get key from database, on not found, error returns nil Put(key [KeyLength]byte, value []byte) error // Put the value in the database, throws an error if fails PutBatch(TXs []TX) error // End and commit a batch of transactions }
Click to show internal directories.
Click to hide internal directories.