Documentation ¶
Overview ¶
Package tsdb implements OpenTSDB protocol.
Index ¶
- func Clean(s string) string
- func Tick(d time.Duration) <-chan time.Time
- type Chan
- type Client
- type ClientConfig
- type Decoder
- type Encoder
- type Point
- func (p *Point) Copy() *Point
- func (p *Point) Equal(q *Point) bool
- func (p *Point) Free()
- func (p *Point) Metric() []byte
- func (p *Point) SetMetric(s []byte) error
- func (p *Point) SetTags(keyval ...[]byte) error
- func (p *Point) SetValue(value interface{}) error
- func (p *Point) String() string
- func (p *Point) Tag(key []byte) []byte
- func (p *Point) Tags() []string
- func (p *Point) Time() time.Time
- func (p *Point) Value() interface{}
- func (p *Point) XAppendTags(nameval ...string) error
- type Series
- type SyntaxError
- type Ticker
- Bugs
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Client ¶
type Client struct { Dial func(string) (net.Conn, error) // contains filtered or unexported fields }
Client represents a connection pool to the TSDB server.
func NewClient ¶
func NewClient(hosts string, config *ClientConfig) *Client
NewClient returns a TSDB client. The client supervises internal connection pool. Network errors are handled by re-connecting with exponential backoff.
type ClientConfig ¶
type Decoder ¶
type Decoder struct {
// contains filtered or unexported fields
}
func NewDecoder ¶
func (*Decoder) Decode ¶
Decode decodes the next data point from the input. SyntaxError will be returned if an invalid point is encountered. Decoder is valid for use despite syntax errors: it can resynchronise.
func (*Decoder) DisableOrderCheck ¶
func (d *Decoder) DisableOrderCheck()
DisableOrderCheck disables the expensive time series order check. Useful if the stream can be expected to be already time-ordered.
type Point ¶
type Point struct {
// contains filtered or unexported fields
}
func (*Point) Free ¶
func (p *Point) Free()
Free returns Point's memory into an internal free list. Free is safe to call after a final Encode or Put.
func (*Point) Tag ¶
Tag returns the value associated with the given tag key. It returns an nil slice if tag was not found.
func (*Point) XAppendTags ¶
type Series ¶
type Series interface {
Next() *Point
}
Series represents an infinite sequence of data points.
type SyntaxError ¶
type SyntaxError struct {
// contains filtered or unexported fields
}
A SyntaxError signals a syntax error in the TSDB input stream.
type Ticker ¶
A Ticker holds a channel that delivers `ticks' of a clock at intervals.
Notes ¶
Bugs ¶
Millisecond resolution is accepted by Decode and NewPoint, but lost by Encode and Put.