Documentation ¶
Index ¶
- Variables
- type Config
- type Memory
- func (s *Memory) Close() error
- func (s *Memory) Conn() map[string]entry
- func (s *Memory) Connection(name string) storage.Storage
- func (s *Memory) Delete(key string) error
- func (s *Memory) DeleteByPrefix(prefix []byte)
- func (s *Memory) Get(key string) ([]byte, error)
- func (s *Memory) Iterate(fn func(key []byte, value []byte))
- func (s *Memory) IterateByPrefix(prefix []byte, limit uint64, fn func(key []byte, value []byte)) uint64
- func (s *Memory) IterateByPrefixFrom(prefix []byte, from []byte, limit uint64, fn func(key []byte, value []byte)) uint64
- func (s *Memory) KeysByPrefixCount(prefix []byte) uint64
- func (s *Memory) Reset() error
- func (s *Memory) Set(key string, val []byte, exp time.Duration) error
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 Memory ¶
type Memory struct {
// contains filtered or unexported fields
}
Memory interface that is implemented by storage providers
func (*Memory) DeleteByPrefix ¶
func (*Memory) IterateByPrefix ¶
func (*Memory) IterateByPrefixFrom ¶
func (*Memory) KeysByPrefixCount ¶
Click to show internal directories.
Click to hide internal directories.