Documentation ¶
Overview ¶
Package statedb handles the states storage on LevelDB.
Design ¶
The db file name is state-NumGridxGirdLen, and the key-value design in leveldb is:
Key: <Name>:<GridNo> Value: <Average>:<StdDev>:<Count>
The GridNo is computed by:
GirdNo = (Stamp % Period) / GirdLen
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // ErrNotFound is returned when requested data not found. ErrNotFound = errors.New("statedb: not found") // ErrCorrupted is returned when corrupted data found. ErrCorrupted = errors.New("statedb: corrupted data found") )
Functions ¶
This section is empty.
Types ¶
type DB ¶
type DB struct {
// contains filtered or unexported fields
}
DB handles the states storage for detection.
func (*DB) Delete ¶
Delete all states for a metric name. This operation is currently only used for cleaning.
Click to show internal directories.
Click to hide internal directories.