Documentation ¶
Overview ¶
Package serde is the interface (and currently PostgreSQL implementaiton) for Serialization/Deserialization of data.
Index ¶
- Variables
- func InitDb(connect_string, prefix string) (*pgvSerDe, error)
- func NewMemSerDe() *memSerDe
- type DataSourceSearcher
- type DbAddresser
- type DbDataSource
- type DbDataSourcer
- type DbRoundRobinArchive
- func (rra *DbRoundRobinArchive) BundleId() int64
- func (rra *DbRoundRobinArchive) Copy() rrd.RoundRobinArchiver
- func (rra *DbRoundRobinArchive) Id() int64
- func (rra *DbRoundRobinArchive) Idx() int64
- func (rra *DbRoundRobinArchive) Seg() int64
- func (rra *DbRoundRobinArchive) SlotRow(slot int64) int64
- func (rra *DbRoundRobinArchive) Width() int64
- type DbRoundRobinArchiver
- type DbSerDe
- type EventListener
- type Fetcher
- type Flusher
- type Ident
- type SearchQuery
- type SearchResult
- type SerDe
Constants ¶
This section is empty.
Variables ¶
View Source
var PgSegmentWidth int = 200
Functions ¶
Types ¶
type DataSourceSearcher ¶
type DataSourceSearcher interface { // Return a list od DS ids based on the query. How the query works // is up to the serde, it can even ignore the argumen, but the // general idea was a key: regex list where the underlying engine // would return all DSs whose ident tags named key match the // regex. Remember to Close() the SearchResult in the end. Search(query SearchQuery) (SearchResult, error) }
type DbAddresser ¶
type DbDataSource ¶
type DbDataSource struct { rrd.DataSourcer // contains filtered or unexported fields }
func NewDbDataSource ¶
func NewDbDataSource(id int64, ident Ident, seg, idx int64, ds rrd.DataSourcer) *DbDataSource
func (*DbDataSource) Copy ¶
func (ds *DbDataSource) Copy() rrd.DataSourcer
func (*DbDataSource) Created ¶
func (ds *DbDataSource) Created() bool
func (*DbDataSource) Id ¶
func (ds *DbDataSource) Id() int64
func (*DbDataSource) Ident ¶
func (ds *DbDataSource) Ident() Ident
func (*DbDataSource) Idx ¶
func (ds *DbDataSource) Idx() int64
func (*DbDataSource) Seg ¶
func (ds *DbDataSource) Seg() int64
type DbDataSourcer ¶
type DbRoundRobinArchive ¶
type DbRoundRobinArchive struct { rrd.RoundRobinArchiver // contains filtered or unexported fields }
func (*DbRoundRobinArchive) BundleId ¶
func (rra *DbRoundRobinArchive) BundleId() int64
func (*DbRoundRobinArchive) Copy ¶
func (rra *DbRoundRobinArchive) Copy() rrd.RoundRobinArchiver
func (*DbRoundRobinArchive) Id ¶
func (rra *DbRoundRobinArchive) Id() int64
func (*DbRoundRobinArchive) Idx ¶
func (rra *DbRoundRobinArchive) Idx() int64
func (*DbRoundRobinArchive) Seg ¶
func (rra *DbRoundRobinArchive) Seg() int64
func (*DbRoundRobinArchive) SlotRow ¶
func (rra *DbRoundRobinArchive) SlotRow(slot int64) int64
SlotRow returns the row number given a slot number. This is mostly useful in serde implementations.
func (*DbRoundRobinArchive) Width ¶
func (rra *DbRoundRobinArchive) Width() int64
type DbRoundRobinArchiver ¶
type DbSerDe ¶
type DbSerDe interface { SerDe DbAddresser() DbAddresser }
type EventListener ¶
type Fetcher ¶
type Fetcher interface { DataSourceSearcher // Fetch all the data sources (used to populate the cache on start) FetchDataSources() ([]rrd.DataSourcer, error) // Fetch or create a single DS. Passing a nil dsSpec disables creation. FetchOrCreateDataSource(ident Ident, dsSpec *rrd.DSSpec) (rrd.DataSourcer, error) // FetchSeries is responsible for presenting a DS as a // series.Series. This may include selecting the most suitable RRA // of the DS to satisfy span and resolution requested, as well as // setting up a database cursor which will be used to iterate over // the series. FetchSeries(ds rrd.DataSourcer, from, to time.Time, maxPoints int64) (series.Series, error) }
type Flusher ¶
type Flusher interface { FlushDataPoints(bunlde_id, seg, i int64, dps, vers map[int64]interface{}) (int, error) FlushDSStates(seg int64, lastupdate, value, duration map[int64]interface{}) (int, error) FlushRRAStates(bundle_id, seg int64, latests, value, duration map[int64]interface{}) (int, error) }
type SearchQuery ¶
type SearchResult ¶
An iterator, similar to sql.Rows.
type SerDe ¶
type SerDe interface { Fetcher() Fetcher Flusher() Flusher EventListener() EventListener }
Click to show internal directories.
Click to hide internal directories.