metricdb

package
v0.0.0-...-084b0cb Latest Latest
Warning

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

Go to latest
Published: Feb 24, 2022 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CheckMetricSelector

func CheckMetricSelector(s string) (string, bool)

func CreateSchema

func CreateSchema(db *sqlx.DB) error

func NewBatchInserter

func NewBatchInserter(db *sqlx.DB, maxBatch int64) (*metricBatchInserter, error)

func RowsOf

func RowsOf(rows *sqlx.Rows, err error) rh

func SplitMetricKey

func SplitMetricKey(s string) (string, string)

func ValueFromValidSelector

func ValueFromValidSelector(selector, label string) (string, bool)

func VersionParts

func VersionParts(version string) (major, minor, micro int, stream string, t time.Time, pre string, ok bool)

Types

type DB

type DB struct {
	// contains filtered or unexported fields
}

func New

func New(path string, statusURL url.URL, maxAge time.Duration) (*DB, error)

func (*DB) JobCountsByName

func (d *DB) JobCountsByName() map[string]int64

func (*DB) JobsByName

func (d *DB) JobsByName() map[string]int64

func (*DB) MetricsByName

func (d *DB) MetricsByName() map[string]int64

func (*DB) NewReadConnection

func (d *DB) NewReadConnection() (*sqlx.DB, error)

func (*DB) Run

func (d *DB) Run() error

type Int64Range

type Int64Range struct {
	Min int64
	Max int64
}

func (Int64Range) Includes

func (r Int64Range) Includes(v int64) bool

type OutputMetric

type OutputMetric struct {
	Timestamp int64  `json:"timestamp"`
	Value     string `json:"value"`
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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