Documentation
¶
Overview ¶
Package store provides implementation of LevelDB key/value database.
Create or open a database:
// The returned DB instance is safe for concurrent use. Which mean that all // DB's methods may be called concurrently from multiple goroutine. db, err := store.NewStore("path/to/db") ... defer db.Close() ...
Read or modify the database content:
// Remember that the contents of the returned slice should not be modified. data := db.Get(key) ... db.Put(key), []byte("value")) ... db.Delete(key) ...
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type LevelDBStore ¶
type LevelDBStore struct {
// contains filtered or unexported fields
}
func (*LevelDBStore) Delete ¶
func (s *LevelDBStore) Delete(key string)
func (*LevelDBStore) Get ¶
func (s *LevelDBStore) Get(key string) []byte
Get returns the value corresponding to the given key
func (*LevelDBStore) Set ¶
func (s *LevelDBStore) Set(key string, value []byte)
Set stores the url for a given fingerprint
Click to show internal directories.
Click to hide internal directories.