Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ClearCache ¶
func ClearCache()
func PrintCacheStats ¶
func PrintCacheStats()
Types ¶
type CacheStats ¶
type CacheStats struct {
Hits atomic.Int64
Misses atomic.Int64
// contains filtered or unexported fields
}
func (*CacheStats) Hit ¶
func (c *CacheStats) Hit()
func (*CacheStats) Miss ¶
func (c *CacheStats) Miss()
func (*CacheStats) Reset ¶
func (c *CacheStats) Reset()
func (*CacheStats) String ¶
func (c *CacheStats) String() string
type Chunk ¶
This reprsents a chunk of data that would be stored on disk
func (Chunk) EstimateSize ¶
type ChunkData ¶
type ChunkData struct {
Id ChunkId
Timestamp time.Time
Keys []string
IndexedKeyFrame IndexedKeyFrame
Diffs []DiffEvent
// contains filtered or unexported fields
}
This is what is actually stored on disk
func (ChunkData) GetDiskSize ¶
type ChunkId ¶
type ChunkId string
A chunk Id is in the form YYYY/MM/DD/YYYYMMDD_HHMMSS.sssssssss $ChunkId.data would be the key in a storage system to locate a chunks data $ChunkId.header would be the key in a storage system to locate a chunks meta data
func NewChunkId ¶
type Header ¶
type Header struct {
LastUpdate time.Time
Id ChunkId
Prev ChunkId
Next ChunkId
Min time.Time
Max time.Time
}
This reprsents a chunk of data that would be stored on disk It is small so it can quickly be overwritten.
func LoadHeader ¶
Loads a header from the storage system
func (Header) RemoveFromStorage ¶
type Index ¶
type IndexedKVPair ¶
type IndexedKeyFrame ¶
type IndexedKeyFrame []IndexedKVPair
func NewIndexedKeyFrame ¶
func NewIndexedKeyFrame(keyFrame KeyFrame, keyIndex map[string]int32) IndexedKeyFrame
Click to show internal directories.
Click to hide internal directories.