shims

package
v4.3.2+incompatible Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 31, 2016 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var PROJECT_EPOCH = 1451606400

Functions

func NewExplicitID

func NewExplicitID() int64

NewExplicitID uses UNIX timestamp in microseconds as ID.

Types

type Base

type Base struct {
	AppContext context.Context
}

type TSEvent

type TSEvent struct {
	Base
	ClusterID int64
}

func NewTSEvent

func NewTSEvent(ctx context.Context, clusterID int64) *TSEvent

func (*TSEvent) AllBandsByClusterIDAndCreatedFromRangeForHighchart

func (ts *TSEvent) AllBandsByClusterIDAndCreatedFromRangeForHighchart(clusterID, from, to, deletedFrom int64) ([]shared.TSEventHighchartLinePayload, error)

func (*TSEvent) AllLinesByClusterIDAndCreatedFromRangeForHighchart

func (ts *TSEvent) AllLinesByClusterIDAndCreatedFromRangeForHighchart(clusterID, from, to, deletedFrom int64) ([]shared.TSEventHighchartLinePayload, error)

func (*TSEvent) CreateFromJSON

func (ts *TSEvent) CreateFromJSON(id, clusterID int64, jsonData []byte, deletedFrom int64, ttl time.Duration) (interface{}, error)

func (*TSEvent) GetDBType

func (ts *TSEvent) GetDBType() string

func (*TSEvent) GetPGDB

func (ts *TSEvent) GetPGDB() (*sqlx.DB, error)

type TSLog

type TSLog struct {
	Base
	ClusterID int64
}

func NewTSLog

func NewTSLog(ctx context.Context, clusterID int64) *TSLog

func (*TSLog) AllByClusterIDRangeAndQuery

func (ts *TSLog) AllByClusterIDRangeAndQuery(clusterID int64, from, to int64, resourcedQuery string, deletedFrom int64) (interface{}, error)

AllByClusterIDRangeAndQuery returns all rows by cluster id, unix timestamp range, and resourced query.

func (*TSLog) CreateFromJSON

func (ts *TSLog) CreateFromJSON(clusterID int64, jsonData []byte, deletedFrom int64, ttl time.Duration) error

func (*TSLog) GetDBType

func (ts *TSLog) GetDBType() string

func (*TSLog) GetPGDB

func (ts *TSLog) GetPGDB() (*sqlx.DB, error)

func (*TSLog) LastByClusterID

func (ts *TSLog) LastByClusterID(clusterID int64) (shared.ICreatedUnix, error)

LastByClusterID returns the last row by cluster id.

type TSMetric

type TSMetric struct {
	Base
	ClusterID int64
}

func NewTSMetric

func NewTSMetric(ctx context.Context, clusterID int64) *TSMetric

func (*TSMetric) AllByMetricIDAndRangeForHighchart

func (ts *TSMetric) AllByMetricIDAndRangeForHighchart(clusterID, metricID, from, to, deletedFrom, downsample int64) ([]*shared.TSMetricHighchartPayload, error)

func (*TSMetric) AllByMetricIDHostAndRangeForHighchart

func (ts *TSMetric) AllByMetricIDHostAndRangeForHighchart(clusterID, metricID int64, host string, from, to, deletedFrom, downsample int64) (*shared.TSMetricHighchartPayload, error)

func (*TSMetric) CreateByHostRow

func (ts *TSMetric) CreateByHostRow(hostRow shared.IHostRow, metricsMap map[string]int64, deletedFrom int64, ttl time.Duration) error

func (*TSMetric) GetAggregateXMinutesByMetricIDAndHostname

func (ts *TSMetric) GetAggregateXMinutesByMetricIDAndHostname(clusterID, metricID int64, minutes int, hostname string) (*shared.TSMetricAggregateRow, error)

func (*TSMetric) GetDBType

func (ts *TSMetric) GetDBType() string

func (*TSMetric) GetPGDB

func (ts *TSMetric) GetPGDB() (*sqlx.DB, error)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL