datasource

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Dec 11, 2018 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BuildOptions

type BuildOptions struct {
	Logger *zap.Logger
}

func (BuildOptions) NamedLogger

func (o BuildOptions) NamedLogger(name string) *zap.Logger

type Builder

type Builder interface {
	Build(ds *config.DataSource, opts BuildOptions) (DataSource, error)
}

type Check

type Check struct {
	Name string
	Expr string
	For  string
}

type CheckResult

type CheckResult struct {
	Actives []string
}

type Checker

type Checker interface {
	Check(ctx context.Context, checks []Check) (*CheckResult, error)
}

type DataSource

type DataSource interface {
	Querier
	Checker
}

type Querier

type Querier interface {
	Query(ctx context.Context, query string, ts time.Time) ([]*Sample, error)
	CollectSummary(ctx context.Context, ts time.Time) (*model.MetricsSummary, error)
}

type Sample

type Sample struct {
	Labels    map[string]string
	Value     float64
	Timestamp time.Time
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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