Documentation
¶
Index ¶
- Variables
- type DBType
- type HybridMap
- func (hm *HybridMap) Close() error
- func (hm *HybridMap) Del(key string) error
- func (hm *HybridMap) Get(k string) ([]byte, bool)
- func (hm *HybridMap) Scan(f func([]byte, []byte) error)
- func (hm *HybridMap) Set(k string, v []byte) error
- func (hm *HybridMap) Size() int64
- func (hm *HybridMap) TuneMemory()
- type MapType
- type Options
Constants ¶
This section is empty.
Variables ¶
View Source
var DefaultDiskOptions = Options{ Type: Disk, DBType: LevelDB, Cleanup: true, RemoveOlderThan: 24 * time.Hour * 2, }
View Source
var DefaultHybridOptions = Options{ Type: Hybrid, DBType: PogrebDB, MemoryExpirationTime: time.Duration(5) * time.Minute, JanitorTime: time.Duration(1) * time.Minute, }
View Source
var DefaultMemoryOptions = Options{ Type: Memory, }
Functions ¶
This section is empty.
Types ¶
type HybridMap ¶
type HybridMap struct {
// contains filtered or unexported fields
}
func (*HybridMap) TuneMemory ¶
func (hm *HybridMap) TuneMemory()
type Options ¶
type Options struct {
MemoryExpirationTime time.Duration
DiskExpirationTime time.Duration
JanitorTime time.Duration
Type MapType
DBType DBType
MemoryGuardForceDisk bool
MemoryGuard bool
MaxMemorySize int
MemoryGuardTime time.Duration
Path string
Cleanup bool
Name string
// Remove temporary hmap in the temporary folder older than duration
RemoveOlderThan time.Duration
}
Click to show internal directories.
Click to hide internal directories.