Documentation
¶
Index ¶
- Constants
- func ForEachRow(iterator RraRowIterator, collector func(row *RraRow) error) error
- type DataOutput
- type Datasource
- type DatasourceAbsolute
- type DatasourceAbstract
- func (d *DatasourceAbstract) DumpTo(dumper DataOutput) error
- func (d *DatasourceAbstract) GetLastValue() string
- func (d *DatasourceAbstract) GetName() string
- func (d *DatasourceAbstract) ProcessPdp(pdpValue float64, elapsed ElapsedPdpSteps, step time.Duration) float64
- func (d *DatasourceAbstract) SetLastValue(lastValue string)
- func (d *DatasourceAbstract) UpdatePdp(pdpValue, interval float64)
- type DatasourceCompute
- func (d *DatasourceCompute) CalculatePdpPrep(newValue string, interval float64) (float64, error)
- func (d *DatasourceCompute) DumpTo(dumper DataOutput) error
- func (d *DatasourceCompute) GetLastValue() string
- func (d *DatasourceCompute) GetName() string
- func (d *DatasourceCompute) UpdatePdp(pdpValue, interval float64)
- type DatasourceCounter
- type DatasourceDCounter
- type DatasourceDDerive
- type DatasourceDerive
- type DatasourceGauge
- type ElapsedPdpSteps
- type Rra
- type RraAbstract
- type RraAbstractGeneric
- func (r *RraAbstractGeneric) DumpTo(rrdStore Store, dumper DataOutput)
- func (r *RraAbstractGeneric) GetPrimaryValues() []float64
- func (r *RraAbstractGeneric) GetSecondaryValues() []float64
- func (r *RraAbstractGeneric) UpdateAberantCdp(pdpTemp []float64, first bool)
- func (r *RraAbstractGeneric) UpdateCdpPreps(pdpTemp []float64, elapsed ElapsedPdpSteps) uint64
- type RraAverage
- type RraCpdPrepBase
- type RraCpdPrepFailures
- type RraCpdPrepGeneric
- type RraCpdPrepHwPredict
- type RraCpdPrepSeasonal
- type RraDevPredict
- func (r *RraDevPredict) DumpTo(rrdStore Store, dumper DataOutput)
- func (r *RraDevPredict) GetPrimaryValues() []float64
- func (r *RraDevPredict) GetSecondaryValues() []float64
- func (r *RraDevPredict) UpdateAberantCdp(pdpTemp []float64, first bool)
- func (r *RraDevPredict) UpdateCdpPreps(pdpTemp []float64, elapsed ElapsedPdpSteps) uint64
- type RraDevSeasonal
- type RraHwFailures
- func (r *RraHwFailures) DumpTo(rrdStore Store, dumper DataOutput)
- func (r *RraHwFailures) GetPrimaryValues() []float64
- func (r *RraHwFailures) GetSecondaryValues() []float64
- func (r *RraHwFailures) UpdateAberantCdp(pdpTemp []float64, first bool)
- func (r *RraHwFailures) UpdateCdpPreps(pdpTemp []float64, elapsed ElapsedPdpSteps) uint64
- type RraHwPredict
- func (r *RraHwPredict) DumpTo(rrdStore Store, dumper DataOutput)
- func (r *RraHwPredict) GetPrimaryValues() []float64
- func (r *RraHwPredict) GetSecondaryValues() []float64
- func (r *RraHwPredict) UpdateAberantCdp(pdpTemp []float64, first bool)
- func (r *RraHwPredict) UpdateCdpPreps(pdpTemp []float64, elapsed ElapsedPdpSteps) uint64
- type RraLast
- type RraMax
- type RraMin
- type RraRow
- type RraRowIterator
- type RraSeasonal
- func (r *RraSeasonal) DumpTo(rrdStore Store, dumper DataOutput)
- func (r *RraSeasonal) GetPrimaryValues() []float64
- func (r *RraSeasonal) GetSecondaryValues() []float64
- func (r *RraSeasonal) UpdateAberantCdp(pdpTemp []float64, first bool)
- func (r *RraSeasonal) UpdateCdpPreps(pdpTemp []float64, elapsed ElapsedPdpSteps) uint64
- type Rrd
- type Store
Constants ¶
View Source
const DatasourceTypeAbsolute = "ABSOLUTE"
View Source
const DatasourceTypeCompute = "COMPUTE"
View Source
const DatasourceTypeCounter = "COUNTER"
View Source
const DatasourceTypeDCounter = "DCOUNTER"
View Source
const DatasourceTypeDDerive = "DDERIVE"
View Source
const DatasourceTypeDerive = "DERIVE"
View Source
const DatasourceTypeGauge = "GAUGE"
View Source
const RraTypeAverage = "AVERAGE"
View Source
const RraTypeDevPredict = "DEVPREDICT"
View Source
const RraTypeDevSeasonal = "DEVSEASONAL"
View Source
const RraTypeFailures = "FAILURES"
View Source
const RraTypeHwPredict = "HWPREDICT"
View Source
const RraTypeLast = "LAST"
View Source
const RraTypeMax = "MAX"
View Source
const RraTypeMin = "MIN"
View Source
const RraTypeSeasonal = "SEASONAL"
View Source
const Undefined = "U"
Variables ¶
This section is empty.
Functions ¶
func ForEachRow ¶
func ForEachRow(iterator RraRowIterator, collector func(row *RraRow) error) error
Types ¶
type DataOutput ¶
type DataOutput interface {
DumpComment(comment string)
DumpString(field, value string)
DumpDouble(field string, value float64)
DumpUnsignedLong(field string, value uint64)
DumpTime(field string, value time.Time)
DumpDuration(field string, value time.Duration)
DumpSubFields(field string, subDump func(DataOutput) error)
Finalize() error
}
type Datasource ¶
type DatasourceAbsolute ¶
type DatasourceAbsolute struct {
DatasourceAbstract
}
func (*DatasourceAbsolute) CalculatePdpPrep ¶
func (d *DatasourceAbsolute) CalculatePdpPrep(newValue string, interval float64) (float64, error)
func (*DatasourceAbsolute) DumpTo ¶
func (d *DatasourceAbsolute) DumpTo(dumper DataOutput) error
type DatasourceAbstract ¶
type DatasourceAbstract struct {
Name string `ds:"name"`
Heartbeat uint64 `ds:"param0"`
Min float64 `ds:"param1"`
Max float64 `ds:"param2"`
LastValue string `pdp:"lastValue"`
UnknownSecCount uint64 `pdp:"0"`
PdpValue float64 `pdp:"1"`
}
func (*DatasourceAbstract) DumpTo ¶
func (d *DatasourceAbstract) DumpTo(dumper DataOutput) error
func (*DatasourceAbstract) GetLastValue ¶
func (d *DatasourceAbstract) GetLastValue() string
func (*DatasourceAbstract) GetName ¶
func (d *DatasourceAbstract) GetName() string
func (*DatasourceAbstract) ProcessPdp ¶
func (d *DatasourceAbstract) ProcessPdp(pdpValue float64, elapsed ElapsedPdpSteps, step time.Duration) float64
func (*DatasourceAbstract) SetLastValue ¶
func (d *DatasourceAbstract) SetLastValue(lastValue string)
func (*DatasourceAbstract) UpdatePdp ¶
func (d *DatasourceAbstract) UpdatePdp(pdpValue, interval float64)
type DatasourceCompute ¶
func (*DatasourceCompute) CalculatePdpPrep ¶
func (d *DatasourceCompute) CalculatePdpPrep(newValue string, interval float64) (float64, error)
func (*DatasourceCompute) DumpTo ¶
func (d *DatasourceCompute) DumpTo(dumper DataOutput) error
func (*DatasourceCompute) GetLastValue ¶
func (d *DatasourceCompute) GetLastValue() string
func (*DatasourceCompute) GetName ¶
func (d *DatasourceCompute) GetName() string
func (*DatasourceCompute) UpdatePdp ¶
func (d *DatasourceCompute) UpdatePdp(pdpValue, interval float64)
type DatasourceCounter ¶
type DatasourceCounter struct {
DatasourceAbstract
}
func (*DatasourceCounter) CalculatePdpPrep ¶
func (d *DatasourceCounter) CalculatePdpPrep(newValue string, interval float64) (float64, error)
func (*DatasourceCounter) DumpTo ¶
func (d *DatasourceCounter) DumpTo(dumper DataOutput) error
type DatasourceDCounter ¶
type DatasourceDCounter struct {
DatasourceAbstract
}
func (*DatasourceDCounter) CalculatePdpPrep ¶
func (d *DatasourceDCounter) CalculatePdpPrep(newValue string, interval float64) (float64, error)
func (*DatasourceDCounter) DumpTo ¶
func (d *DatasourceDCounter) DumpTo(dumper DataOutput) error
type DatasourceDDerive ¶
type DatasourceDDerive struct {
DatasourceAbstract
}
func (*DatasourceDDerive) CalculatePdpPrep ¶
func (d *DatasourceDDerive) CalculatePdpPrep(newValue string, interval float64) (float64, error)
func (*DatasourceDDerive) DumpTo ¶
func (d *DatasourceDDerive) DumpTo(dumper DataOutput) error
type DatasourceDerive ¶
type DatasourceDerive struct {
DatasourceAbstract
}
func (*DatasourceDerive) CalculatePdpPrep ¶
func (d *DatasourceDerive) CalculatePdpPrep(newValue string, interval float64) (float64, error)
func (*DatasourceDerive) DumpTo ¶
func (d *DatasourceDerive) DumpTo(dumper DataOutput) error
type DatasourceGauge ¶
type DatasourceGauge struct {
DatasourceAbstract
}
func (*DatasourceGauge) CalculatePdpPrep ¶
func (d *DatasourceGauge) CalculatePdpPrep(newValue string, interval float64) (float64, error)
func (*DatasourceGauge) DumpTo ¶
func (d *DatasourceGauge) DumpTo(dumper DataOutput) error
type ElapsedPdpSteps ¶
type Rra ¶
type Rra interface {
GetRowCount() uint64
GetPdpPerRow() uint64
GetPrimaryValues() []float64
GetSecondaryValues() []float64
UpdateCdpPreps(pdpTemp []float64, elapsed ElapsedPdpSteps) uint64
UpdateAberantCdp(pdpTemp []float64, first bool)
// DumpTo dumps the content of the archive to a data dumper.
DumpTo(rrdStore Store, dumper DataOutput)
}
Rra is the generic interface to access a round robin archive.
type RraAbstract ¶
type RraAbstract struct {
Index int
RowCount uint64 `rra:"rowCount"`
PdpPerRow uint64 `rra:"pdpPerRow"`
}
func (*RraAbstract) DumpDatabase ¶
func (r *RraAbstract) DumpDatabase(rrdStore Store, dumper DataOutput)
func (*RraAbstract) GetPdpPerRow ¶
func (r *RraAbstract) GetPdpPerRow() uint64
func (*RraAbstract) GetRowCount ¶
func (r *RraAbstract) GetRowCount() uint64
type RraAbstractGeneric ¶
type RraAbstractGeneric struct {
RraAbstract
XFilesFactor float64 `rra:"param0"`
CpdPreps []RraCpdPrepGeneric `rra:"cpdPreps"`
UpdateAberantCdpFunc func(pdpTemp float64, cpdPrep *RraCpdPrepGeneric)
InitializeCdpFunc func(pdpTemp float64, pdpPerRow, startPdpOffset uint64, cpdPrep *RraCpdPrepGeneric)
InitializeCarryOverFunc func(pdpTemp float64, elapsedPdpSt, pdpPerRow, startPdpOffset uint64, cpdPrep *RraCpdPrepGeneric) float64
CalculateCdpValueFunc func(pdpTemp float64, elapsedPdpSt uint64, cpdPrep *RraCpdPrepGeneric) float64
}
func (*RraAbstractGeneric) DumpTo ¶
func (r *RraAbstractGeneric) DumpTo(rrdStore Store, dumper DataOutput)
func (*RraAbstractGeneric) GetPrimaryValues ¶
func (r *RraAbstractGeneric) GetPrimaryValues() []float64
func (*RraAbstractGeneric) GetSecondaryValues ¶
func (r *RraAbstractGeneric) GetSecondaryValues() []float64
func (*RraAbstractGeneric) UpdateAberantCdp ¶
func (r *RraAbstractGeneric) UpdateAberantCdp(pdpTemp []float64, first bool)
func (*RraAbstractGeneric) UpdateCdpPreps ¶
func (r *RraAbstractGeneric) UpdateCdpPreps(pdpTemp []float64, elapsed ElapsedPdpSteps) uint64
type RraAverage ¶
type RraAverage struct {
RraAbstractGeneric
}
func (*RraAverage) DumpTo ¶
func (r *RraAverage) DumpTo(rrdStore Store, dumper DataOutput)
type RraCpdPrepBase ¶
func (*RraCpdPrepBase) DumpTo ¶
func (c *RraCpdPrepBase) DumpTo(dumper DataOutput)
type RraCpdPrepFailures ¶
type RraCpdPrepFailures struct {
RraCpdPrepBase
History []byte `cdp:"raw"`
}
func (*RraCpdPrepFailures) DumpToWitHistory ¶
func (c *RraCpdPrepFailures) DumpToWitHistory(windowLen uint64, dumper DataOutput)
type RraCpdPrepGeneric ¶
type RraCpdPrepGeneric struct {
RraCpdPrepBase
Value float64 `cdp:"0"`
UnknownDatapoints uint64 `cdp:"1"`
}
func (*RraCpdPrepGeneric) DumpTo ¶
func (c *RraCpdPrepGeneric) DumpTo(dumper DataOutput)
func (*RraCpdPrepGeneric) Reset ¶
func (r *RraCpdPrepGeneric) Reset(pdp float64)
type RraCpdPrepHwPredict ¶
type RraCpdPrepHwPredict struct {
RraCpdPrepBase
Intercept float64 `cdp:"2"`
LastIntercept float64 `cdp:"3"`
Slope float64 `cdp:"4"`
LastSlope float64 `cdp:"5"`
NullCount uint64 `cdp:"6"`
LastNullCount uint64 `cdp:"7"`
}
func (*RraCpdPrepHwPredict) DumpTo ¶
func (c *RraCpdPrepHwPredict) DumpTo(dumper DataOutput)
type RraCpdPrepSeasonal ¶
type RraCpdPrepSeasonal struct {
RraCpdPrepBase
Seasonal float64 `cdp:"2"`
LastSeasonal float64 `cdp:"3"`
InitFlag uint64 `cdp:"6"`
}
func (*RraCpdPrepSeasonal) DumpTo ¶
func (c *RraCpdPrepSeasonal) DumpTo(dumper DataOutput)
type RraDevPredict ¶
type RraDevPredict struct {
RraAbstract
DependentRraIdx uint64 `rra:"param3"`
CpdPreps []RraCpdPrepBase `rra:"cpdPreps"`
}
func (*RraDevPredict) DumpTo ¶
func (r *RraDevPredict) DumpTo(rrdStore Store, dumper DataOutput)
func (*RraDevPredict) GetPrimaryValues ¶
func (r *RraDevPredict) GetPrimaryValues() []float64
func (*RraDevPredict) GetSecondaryValues ¶
func (r *RraDevPredict) GetSecondaryValues() []float64
func (*RraDevPredict) UpdateAberantCdp ¶
func (r *RraDevPredict) UpdateAberantCdp(pdpTemp []float64, first bool)
func (*RraDevPredict) UpdateCdpPreps ¶
func (r *RraDevPredict) UpdateCdpPreps(pdpTemp []float64, elapsed ElapsedPdpSteps) uint64
type RraDevSeasonal ¶
type RraDevSeasonal struct {
RraSeasonal
}
func (*RraDevSeasonal) DumpTo ¶
func (r *RraDevSeasonal) DumpTo(rrdStore Store, dumper DataOutput)
type RraHwFailures ¶
type RraHwFailures struct {
RraAbstract
DeltaPos float64 `rra:"param1"`
DeltaNeg float64 `rra:"param2"`
WindowLen uint64 `rra:"param4"`
FailureThreshold uint64 `rra:"param5"`
DependentRraIdx uint64 `rra:"param3"`
CpdPreps []RraCpdPrepFailures `rra:"cpdPreps"`
}
func (*RraHwFailures) DumpTo ¶
func (r *RraHwFailures) DumpTo(rrdStore Store, dumper DataOutput)
func (*RraHwFailures) GetPrimaryValues ¶
func (r *RraHwFailures) GetPrimaryValues() []float64
func (*RraHwFailures) GetSecondaryValues ¶
func (r *RraHwFailures) GetSecondaryValues() []float64
func (*RraHwFailures) UpdateAberantCdp ¶
func (r *RraHwFailures) UpdateAberantCdp(pdpTemp []float64, first bool)
func (*RraHwFailures) UpdateCdpPreps ¶
func (r *RraHwFailures) UpdateCdpPreps(pdpTemp []float64, elapsed ElapsedPdpSteps) uint64
type RraHwPredict ¶
type RraHwPredict struct {
RraAbstract
Alpha float64 `rra:"param1"`
Beta float64 `rra:"param2"`
DependentRraIdx uint64 `rra:"param3"`
CpdPreps []RraCpdPrepHwPredict `rra:"cpdPreps"`
}
func (*RraHwPredict) DumpTo ¶
func (r *RraHwPredict) DumpTo(rrdStore Store, dumper DataOutput)
func (*RraHwPredict) GetPrimaryValues ¶
func (r *RraHwPredict) GetPrimaryValues() []float64
func (*RraHwPredict) GetSecondaryValues ¶
func (r *RraHwPredict) GetSecondaryValues() []float64
func (*RraHwPredict) UpdateAberantCdp ¶
func (r *RraHwPredict) UpdateAberantCdp(pdpTemp []float64, first bool)
func (*RraHwPredict) UpdateCdpPreps ¶
func (r *RraHwPredict) UpdateCdpPreps(pdpTemp []float64, elapsed ElapsedPdpSteps) uint64
type RraLast ¶
type RraLast struct {
RraAbstractGeneric
}
func (*RraLast) DumpTo ¶
func (r *RraLast) DumpTo(rrdStore Store, dumper DataOutput)
type RraMax ¶
type RraMax struct {
RraAbstractGeneric
}
func (*RraMax) DumpTo ¶
func (r *RraMax) DumpTo(rrdStore Store, dumper DataOutput)
type RraMin ¶
type RraMin struct {
RraAbstractGeneric
}
func (*RraMin) DumpTo ¶
func (r *RraMin) DumpTo(rrdStore Store, dumper DataOutput)
type RraRowIterator ¶
type RraSeasonal ¶
type RraSeasonal struct {
RraAbstract
Gamma float64 `rra:"param1"`
SmoothIdx uint64 `rra:"param4"`
DependentRraIdx uint64 `rra:"param3"`
CpdPreps []RraCpdPrepSeasonal `rra:"cpdPreps"`
}
func (*RraSeasonal) DumpTo ¶
func (r *RraSeasonal) DumpTo(rrdStore Store, dumper DataOutput)
func (*RraSeasonal) GetPrimaryValues ¶
func (r *RraSeasonal) GetPrimaryValues() []float64
func (*RraSeasonal) GetSecondaryValues ¶
func (r *RraSeasonal) GetSecondaryValues() []float64
func (*RraSeasonal) UpdateAberantCdp ¶
func (r *RraSeasonal) UpdateAberantCdp(pdpTemp []float64, first bool)
func (*RraSeasonal) UpdateCdpPreps ¶
func (r *RraSeasonal) UpdateCdpPreps(pdpTemp []float64, elapsed ElapsedPdpSteps) uint64
type Rrd ¶
type Rrd struct {
Version uint16
Store Store
Step time.Duration
LastUpdate time.Time
Datasources []Datasource
Rras []Rra
}
func (*Rrd) DumpTo ¶
func (r *Rrd) DumpTo(dumper DataOutput) error
type Store ¶
type Store interface {
Version() uint16
DatasourceTypes() []string
RraTypes() []string
LastUpdate() time.Time
Step() time.Duration
ReadDatasourceParams(index int, params interface{}) error
StoreDatasourceParams(index int, params interface{}) error
ReadRraParams(index int, params interface{}) error
StoreRraParams(index int, params interface{}) error
StoreLastUpdate(lastUpdate time.Time) error
StoreRraPtrs() error
RowIterator(rraIndex int) (RraRowIterator, error)
StoreRow(rraIndex int, row []float64) error
Close()
}
Source Files
¶
- data_output.go
- datasource.go
- datasource_absolute.go
- datasource_abstract.go
- datasource_compute.go
- datasource_counter.go
- datasource_dcounter.go
- datasource_dderive.go
- datasource_derive.go
- datasource_gauge.go
- rra.go
- rra_abstract.go
- rra_abstract_generic.go
- rra_average.go
- rra_dev_predict.go
- rra_dev_seasonal.go
- rra_failures.go
- rra_hw_predict.go
- rra_last.go
- rra_max.go
- rra_min.go
- rra_row_iterator.go
- rra_seasonal.go
- rrd.go
- rrd_dump.go
- rrd_elapsed_steps.go
- rrd_update.go
- store.go
Click to show internal directories.
Click to hide internal directories.