database

package
v1.7.2 Latest Latest
Warning

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

Go to latest
Published: Feb 15, 2024 License: GPL-3.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewLevelDB

func NewLevelDB(path string, batchDelaySeconds int, maxBatchSize int, maxOpenFiles int) (s *leveldb.DB, err error)

NewLevelDB is a constructor for the leveldb persister It creates the files in the location given as parameter

func NewSerialDB

func NewSerialDB(path string, batchDelaySeconds int, maxBatchSize int, maxOpenFiles int) (s *leveldb.SerialDB, err error)

NewSerialDB is a constructor for the leveldb persister It creates the files in the location given as parameter

func NewShardIDProvider added in v1.6.0

func NewShardIDProvider(numShards int32) (storage.ShardIDProvider, error)

NewShardIDProvider is a constructor for shard id provider

func NewShardedPersister added in v1.6.0

func NewShardedPersister(path string, persisterCreator storage.PersisterCreator, idPersister storage.ShardIDProvider) (s storage.Persister, err error)

NewShardedPersister is a constructor for sharded persister based on provided db type

func NewlruDB

func NewlruDB(size uint32) (storage.Persister, error)

NewlruDB creates a lruDB according to size

Types

type MemDB

type MemDB = memorydb.DB

MemDB represents the memory database storage. It holds a map of key value pairs and a mutex to handle concurrent accesses to the map

func NewMemDB

func NewMemDB() *MemDB

NewMemDB creates a new memorydb object

Jump to

Keyboard shortcuts

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