tsdb

package
v5.0.0+incompatible Latest Latest
Warning

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

Go to latest
Published: Jul 2, 2018 License: GPL-3.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ErrorResp

type ErrorResp struct {
	Error InnerError `json:"error"`
}

func (ErrorResp) String

func (this ErrorResp) String() string

type InnerError

type InnerError struct {
	Code    int    `json:"code"`
	Message string `json:"message"`
	Details string `json:"details"`
}

type KairosDbClient

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

func NewKairosDbClient

func NewKairosDbClient(addr string) (*KairosDbClient, error)

func (*KairosDbClient) Query

func (k *KairosDbClient) Query(start, end, rawTags, aggregator, metric string, isRelative bool) (results []Result, err error)

type OpenTsdbClient

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

func NewOpenTsdbClient

func NewOpenTsdbClient(addr string, timeout time.Duration) (*OpenTsdbClient, error)

func (*OpenTsdbClient) Close

func (c *OpenTsdbClient) Close() error

func (*OpenTsdbClient) Query

func (c *OpenTsdbClient) Query(start, end, rawTags, aggregator, metric string, isRelative bool) ([]Result, error)

type Query

type Query struct {
	Aggregator string            `json:"aggregator"`
	Metric     string            `json:"metric"`
	Rate       bool              `json:"rate,omitempty"`
	Tags       map[string]string `json:"tags,omitempty"`
}

type QueryParams

type QueryParams struct {
	Start             interface{} `json:"start"`
	End               interface{} `json:"end,omitempty"`
	Queries           []Query     `json:"queries,omitempty"`
	NoAnnotations     bool        `json:"no_annotations,omitempty"`
	GlobalAnnotations bool        `json:"global_annotations,omitempty"`
	MsResolution      bool        `json:"ms,omitempty"`
	ShowTSUIDs        bool        `json:"show_tsuids,omitempty"`
	ShowSummary       bool        `json:"show_summary,omitempty"`
	ShowQuery         bool        `json:"show_query,omitempty"`
	Delete            bool        `json:"delete,omitempty"`
}

type Result

type Result struct {
	Metric        string             `json:"metric"`
	Tags          map[string]string  `json:"tags"`
	AggregateTags []string           `json:"aggregateTags"`
	Dps           map[string]float64 `json:"dps"`
}

type TsdbClient

type TsdbClient interface {
	Query(start, end, rawTags, aggregator, metric string, is_relative bool) ([]Result, error)
}

Directories

Path Synopsis
go-kairosdb

Jump to

Keyboard shortcuts

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