storage

package
v1.3.24 Latest Latest
Warning

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

Go to latest
Published: May 28, 2022 License: GPL-3.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type StorerStub

type StorerStub struct {
	PutCalled                    func(key, data []byte) error
	PutInEpochCalled             func(key, data []byte, epoch uint32) error
	GetCalled                    func(key []byte) ([]byte, error)
	HasCalled                    func(key []byte) error
	SearchFirstCalled            func(key []byte) ([]byte, error)
	RemoveFromCurrentEpochCalled func(key []byte) error
	RemoveCalled                 func(key []byte) error
	ClearCacheCalled             func()
	DestroyUnitCalled            func() error
	GetFromEpochCalled           func(key []byte, epoch uint32) ([]byte, error)
	GetBulkFromEpochCalled       func(keys [][]byte, epoch uint32) (map[string][]byte, error)
	GetOldestEpochCalled         func() (uint32, error)
	RangeKeysCalled              func(handler func(key []byte, val []byte) bool)
	CloseCalled                  func() error
}

StorerStub -

func (*StorerStub) ClearCache

func (ss *StorerStub) ClearCache()

ClearCache -

func (*StorerStub) Close

func (ss *StorerStub) Close() error

Close -

func (*StorerStub) DestroyUnit

func (ss *StorerStub) DestroyUnit() error

DestroyUnit -

func (*StorerStub) Get

func (ss *StorerStub) Get(key []byte) ([]byte, error)

Get -

func (*StorerStub) GetBulkFromEpoch

func (ss *StorerStub) GetBulkFromEpoch(keys [][]byte, epoch uint32) (map[string][]byte, error)

GetBulkFromEpoch -

func (*StorerStub) GetFromEpoch

func (ss *StorerStub) GetFromEpoch(key []byte, epoch uint32) ([]byte, error)

GetFromEpoch -

func (*StorerStub) GetOldestEpoch

func (ss *StorerStub) GetOldestEpoch() (uint32, error)

GetOldestEpoch -

func (*StorerStub) Has

func (ss *StorerStub) Has(key []byte) error

Has -

func (*StorerStub) IsInterfaceNil

func (ss *StorerStub) IsInterfaceNil() bool

IsInterfaceNil -

func (*StorerStub) Put

func (ss *StorerStub) Put(key, data []byte) error

Put -

func (*StorerStub) PutInEpoch

func (ss *StorerStub) PutInEpoch(key, data []byte, epoch uint32) error

PutInEpoch -

func (*StorerStub) RangeKeys

func (ss *StorerStub) RangeKeys(handler func(key []byte, val []byte) bool)

RangeKeys -

func (*StorerStub) Remove

func (ss *StorerStub) Remove(key []byte) error

Remove -

func (*StorerStub) RemoveFromCurrentEpoch added in v1.3.7

func (ss *StorerStub) RemoveFromCurrentEpoch(key []byte) error

RemoveFromCurrentEpoch -

func (*StorerStub) SearchFirst

func (ss *StorerStub) SearchFirst(key []byte) ([]byte, error)

SearchFirst -

type UnitOpenerStub

type UnitOpenerStub struct {
	OpenDBCalled                   func(dbConfig config.DBConfig, shardID uint32, epoch uint32) (storage.Storer, error)
	GetMostRecentStorageUnitCalled func(config config.DBConfig) (storage.Storer, error)
}

UnitOpenerStub -

func (*UnitOpenerStub) GetMostRecentStorageUnit

func (uohs *UnitOpenerStub) GetMostRecentStorageUnit(config config.DBConfig) (storage.Storer, error)

GetMostRecentStorageUnit -

func (*UnitOpenerStub) IsInterfaceNil

func (uohs *UnitOpenerStub) IsInterfaceNil() bool

IsInterfaceNil -

func (*UnitOpenerStub) OpenDB

func (uohs *UnitOpenerStub) OpenDB(dbConfig config.DBConfig, shardID uint32, epoch uint32) (storage.Storer, error)

OpenDB -

Jump to

Keyboard shortcuts

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