Documentation ¶
Index ¶
- Constants
- func ExportCachedStorageMetrics()
- func Initialize(defaultKVType string, defaultKvCacheSize int, sync bool) error
- func NewCachedStorage(s storage.Storage, megabytesLimit int) (storage.Storage, error)
- func Open(p string) (storage.Storage, error)
- func OpenSpecifyType(typ string, p string) (storage.Storage, error)
- func ResetCachedStorageMetrics()
- type BatchWrapper
- type CachedStorage
Constants ¶
View Source
const ( BlockChain = "blockchain" Ledger = "ledger" Blockfile = "blockfile" Consensus = "consensus" Epoch = "epoch" )
Variables ¶
This section is empty.
Functions ¶
func ExportCachedStorageMetrics ¶
func ExportCachedStorageMetrics()
func NewCachedStorage ¶
func ResetCachedStorageMetrics ¶
func ResetCachedStorageMetrics()
Types ¶
type BatchWrapper ¶
func (*BatchWrapper) Commit ¶
func (w *BatchWrapper) Commit()
func (*BatchWrapper) Delete ¶
func (w *BatchWrapper) Delete(key []byte)
func (*BatchWrapper) Put ¶
func (w *BatchWrapper) Put(key, value []byte)
type CachedStorage ¶
func (*CachedStorage) Close ¶
func (c *CachedStorage) Close() error
func (*CachedStorage) Delete ¶
func (c *CachedStorage) Delete(key []byte)
func (*CachedStorage) Get ¶
func (c *CachedStorage) Get(key []byte) []byte
func (*CachedStorage) Has ¶
func (c *CachedStorage) Has(key []byte) bool
func (*CachedStorage) NewBatch ¶
func (c *CachedStorage) NewBatch() storage.Batch
func (*CachedStorage) Put ¶
func (c *CachedStorage) Put(key, value []byte)
Click to show internal directories.
Click to hide internal directories.