Documentation ¶
Index ¶
- type Client
- func (g *Client) Find(query string, opts *FindOpts) ([]FindResultItem, error)
- func (g *Client) Query(q string, interval TimeInterval) Datapoints
- func (g *Client) QueryFloats(q string, interval TimeInterval) ([]FloatDatapoint, error)
- func (g *Client) QueryFloatsSince(q string, ago time.Duration) ([]FloatDatapoint, error)
- func (g *Client) QueryInts(q string, interval TimeInterval) ([]IntDatapoint, error)
- func (g *Client) QueryIntsSince(q string, ago time.Duration) ([]IntDatapoint, error)
- func (g *Client) QueryMulti(q []string, interval TimeInterval) (MultiDatapoints, error)
- func (g *Client) QueryMultiSince(q []string, ago time.Duration) (MultiDatapoints, error)
- func (g *Client) QuerySince(q string, ago time.Duration) Datapoints
- type Datapoints
- type FindOpts
- type FindResultItem
- type FloatDatapoint
- type IntDatapoint
- type MultiDatapoints
- type TimeInterval
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
func New ¶
Create a new Client from a given URL. The URL is the base adress to Graphite, ie. without "/render" suffix etc.
func NewFromURL ¶
Create a new Client from a given URL. The URL is the base adress to Graphite, ie. without "/render" suffix etc.
func (*Client) Query ¶
func (g *Client) Query(q string, interval TimeInterval) Datapoints
Fetches a Graphite result only expecting one timeseries. Deferring identifying whether the result are ints of floats to later. Useful in clients that executes adhoc queries.
func (*Client) QueryFloats ¶
func (g *Client) QueryFloats(q string, interval TimeInterval) ([]FloatDatapoint, error)
Helper method to make it easier to create an interface for Client.
func (*Client) QueryFloatsSince ¶
Helper method to make it easier to create an interface for Client.
func (*Client) QueryInts ¶
func (g *Client) QueryInts(q string, interval TimeInterval) ([]IntDatapoint, error)
Helper method to make it easier to create an interface for Client.
func (*Client) QueryIntsSince ¶
Helper method to make it easier to create an interface for Client.
func (*Client) QueryMulti ¶
func (g *Client) QueryMulti(q []string, interval TimeInterval) (MultiDatapoints, error)
Fetches one or multiple Graphite series. Deferring identifying whether the result are ints of floats to later. Useful in clients that executes adhoc queries.
func (*Client) QueryMultiSince ¶
Fetches one or multiple Graphite series. Deferring identifying whether the result are ints of floats to later. Useful in clients that executes adhoc queries.
func (*Client) QuerySince ¶
func (g *Client) QuerySince(q string, ago time.Duration) Datapoints
type Datapoints ¶
type Datapoints struct { Target string // contains filtered or unexported fields }
func (Datapoints) AsFloats ¶
func (d Datapoints) AsFloats() ([]FloatDatapoint, error)
func (Datapoints) AsInts ¶
func (d Datapoints) AsInts() ([]IntDatapoint, error)
type FindResultItem ¶
type FloatDatapoint ¶
type IntDatapoint ¶
type MultiDatapoints ¶
type MultiDatapoints []Datapoints
type TimeInterval ¶
func (*TimeInterval) Check ¶
func (t *TimeInterval) Check() error