Documentation
¶
Overview ¶
Package memory Is a copy of the storage memory from the external storage packet as a purpose to test the behavior in the unittests when using a storages from these packets
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ConfigDefault = Config{ GCInterval: 10 * time.Second, }
ConfigDefault is the default config
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct {
// Time before deleting expired keys
//
// Default is 10 * time.Second
GCInterval time.Duration
}
Config defines the config for storage.
type Storage ¶
type Storage struct {
// contains filtered or unexported fields
}
Storage interface that is implemented by storage providers
func (*Storage) Close ¶
Close stops the background garbage collector and releases resources associated with the storage instance.
func (*Storage) Conn ¶ added in v2.39.0
Conn returns the underlying storage map. The map must not be modified by callers.
func (*Storage) Get ¶
Get returns the stored value for key, ignoring missing or expired entries by returning nil.
Click to show internal directories.
Click to hide internal directories.