Documentation ¶
Overview ¶
Package storage interface for metric data storage
Package storage interface for metric data storage
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type DataItem ¶
type DataItem struct { Timestamp int64 `json:"timestamp" bson:"timestamp"` Value float64 `json:"value" bson:"value"` }
DataItem one metric data point
type Item ¶
type Item struct { ID string `json:"id" bson:"_id"` Type string `json:"type" bson:"type"` Tags map[string]string `json:"tags" bson:"tags"` LastValues []DataItem `json:"data,omitempty" bson:"data,omitempty"` }
Item one metric item
type StatItem ¶
type StatItem struct { Start int64 `json:"start"` End int64 `json:"end"` Empty bool `json:"empty"` Samples int64 `json:"samples,omitempty"` Min float64 `json:"min,omitempty"` Max float64 `json:"max,omitempty"` First float64 `json:"first,omitempty"` Last float64 `json:"last,omitempty"` Avg float64 `json:"avg,omitempty"` Median float64 `json:"median,omitempty"` Std float64 `json:"std,omitempty"` Sum float64 `json:"sum,omitempty"` }
StatItem one statistics data point
type Storage ¶
type Storage interface { Name() string Help() string Open(options url.Values) GetTenants() ([]Tenant, error) GetItemList(tenant string, tags map[string]string) ([]Item, error) GetRawData(tenant string, id string, end int64, start int64, limit int64, order string) ([]DataItem, error) GetStatData(tenant string, id string, end int64, start int64, limit int64, order string, bucketDuration int64) ([]StatItem, error) PostRawData(tenant string, id string, t int64, v float64) error PutTags(tenant string, id string, tags map[string]string) error DeleteData(tenant string, id string, end int64, start int64) error DeleteTags(tenant string, id string, tags []string) error }
Storage metric data interface
Directories ¶
Path | Synopsis |
---|---|
Package example interface for example metric data storage
|
Package example interface for example metric data storage |
Package memory interface for memory metric data storage
|
Package memory interface for memory metric data storage |
Package mongo interface for mongo metric data storage
|
Package mongo interface for mongo metric data storage |
Package sqlite interface for sqlite metric data storage
|
Package sqlite interface for sqlite metric data storage |
Click to show internal directories.
Click to hide internal directories.