Documentation ¶
Index ¶
- type MemoryStorage
- func (m *MemoryStorage) Close() error
- func (m *MemoryStorage) GetBytes(identifier string, key key.Key) ([]byte, error)
- func (m *MemoryStorage) GetBytesSafe(identifier string, key key.Key) ([]byte, error)
- func (m *MemoryStorage) GetDBFileName() string
- func (m *MemoryStorage) Len() int
- func (m *MemoryStorage) SetBytes(_ string, key key.Key, value []byte) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type MemoryStorage ¶
type MemoryStorage struct {
// contains filtered or unexported fields
}
MemoryStorage is a simple in-memory storage engine
func NewMemoryStorage ¶
NewMemoryStorage creates a new MemoryStorage object
func (*MemoryStorage) GetBytesSafe ¶
GetBytesSafe attempts to get a value from the database, and returns nil if not found
func (*MemoryStorage) GetDBFileName ¶
func (m *MemoryStorage) GetDBFileName() string
GetDBFileName returns the on-disk filename of the database
func (*MemoryStorage) Len ¶ added in v2.4.0
func (m *MemoryStorage) Len() int
Len returns the number of items currently in the cache
Click to show internal directories.
Click to hide internal directories.