Documentation ¶
Overview ¶
Package rrd does the thing ZZZ.
Index ¶
- type DSSpec
- type DataPoint
- type DataSource
- type DataSourceNames
- type DataSources
- func (dss *DataSources) Delete(ds *DataSource)
- func (dss *DataSources) GetById(id int64) *DataSource
- func (dss *DataSources) GetByName(name string) *DataSource
- func (dss *DataSources) Insert(ds *DataSource)
- func (dss *DataSources) List() []*DataSource
- func (dss *DataSources) Reload(serde SerDe) error
- type FsFindNode
- type RRASpec
- type RoundRobinArchive
- type SerDe
- type Series
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DataSource ¶
type DataSource struct { Id int64 // Id Name string // Series name StepMs int64 // Step Size in Ms HeartbeatMs int64 // Heartbeat in Ms (i.e. inactivity period longer than this causes NaN values) LastUpdate time.Time // Last time we received an update (series time - can be in the past or future) LastDs float64 // Last final value we saw Value float64 // Weighted value (e.g. f we are 2/3 way into a step, Value should be 2/3 of the final step value) UnknownMs int64 // Ms of the data that is "unknown" (e.g. because of exceeded HB) RRAs []*RoundRobinArchive // Array of Round Robin Archives LastFlushRT time.Time // Last time this DS was flushed (actual real time). }
func (*DataSource) BestRRA ¶
func (ds *DataSource) BestRRA(start, end time.Time, points int64) *RoundRobinArchive
func (*DataSource) ClearRRAs ¶
func (ds *DataSource) ClearRRAs(clearLU bool)
func (*DataSource) MostlyCopy ¶
func (ds *DataSource) MostlyCopy() *DataSource
func (*DataSource) ShouldBeFlushed ¶
func (ds *DataSource) ShouldBeFlushed(maxCachedPoints int, minCache, maxCache time.Duration) bool
type DataSourceNames ¶
for Graphite-like listings
func (*DataSourceNames) DsIdsFromIdent ¶
func (dsns *DataSourceNames) DsIdsFromIdent(ident string) map[string]int64
func (*DataSourceNames) FsFind ¶
func (dsns *DataSourceNames) FsFind(pattern string) []*FsFindNode
func (*DataSourceNames) Reload ¶
func (dsns *DataSourceNames) Reload(serde SerDe) error
type DataSources ¶
func (*DataSources) Delete ¶
func (dss *DataSources) Delete(ds *DataSource)
This only deletes it from memory, it is still in the database.
func (*DataSources) GetById ¶
func (dss *DataSources) GetById(id int64) *DataSource
func (*DataSources) GetByName ¶
func (dss *DataSources) GetByName(name string) *DataSource
func (*DataSources) Insert ¶
func (dss *DataSources) Insert(ds *DataSource)
func (*DataSources) List ¶
func (dss *DataSources) List() []*DataSource
func (*DataSources) Reload ¶
func (dss *DataSources) Reload(serde SerDe) error
type FsFindNode ¶
type RoundRobinArchive ¶
type RoundRobinArchive struct { Id int64 DsId int64 Cf string StepsPerRow int32 Size int32 Xff float32 Value float64 UnknownMs int64 Latest time.Time DPs map[int64]float64 Width int64 Start int64 End int64 }
func (*RoundRobinArchive) GetStartGivenEndMs ¶
func (rra *RoundRobinArchive) GetStartGivenEndMs(ds *DataSource, timeMs int64) int64
func (*RoundRobinArchive) SlotRow ¶
func (rra *RoundRobinArchive) SlotRow(slot int64) int64
func (*RoundRobinArchive) SlotTimeStamp ¶
func (rra *RoundRobinArchive) SlotTimeStamp(ds *DataSource, slot int64) time.Time
type SerDe ¶
type SerDe interface { // Create a DS with name, and/or return it CreateOrReturnDataSource(name string, dsSpec *DSSpec) (*DataSource, error) FetchDataSource(id int64) (*DataSource, error) FetchDataSources() ([]*DataSource, error) FetchDataSourceNames() (map[string]int64, error) // Flush a DS FlushDataSource(ds *DataSource) error // Query SeriesQuery(ds *DataSource, from, to time.Time, maxPoints int64) (Series, error) // Use the database to infer outside IPs of other connected clients ListDbClientIps() ([]string, error) MyDbAddr() (*string, error) }
Click to show internal directories.
Click to hide internal directories.