Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Connection ¶
Connection represents a connection to Grapnite
var DefaultConnection *Connection = NewConnection()
DefaultConnection is used, by default, to execute Query()
func NewConnection ¶
func NewConnection() *Connection
NewConnection mints a new Graphite connection which listens for config changes
type Query ¶
type Query struct {
// contains filtered or unexported fields
}
func NewQuery ¶
func NewQuery() *Query
NewQuery mints a new Graphite query from 24 hours ago with no targets (need to be added)
func (*Query) AddTarget ¶
AddTarget adds a single target metric (incl. Graphite function(s)) to the query
type Result ¶
type Result struct {
// contains filtered or unexported fields
}
func (*Result) Next ¶
NextItem can be called inside `for` and will populate the response to Current() Responds with true if a new Current() was found (hence you can call Current() to get it)
func (*Result) Rewind ¶
func (r *Result) Rewind()
Rewind takes the result set iterator back to the start
func (*Result) Target ¶
Target attempts to find the result for a particular target, returning nil if not found
func (*Result) TargetLike ¶
TargetLike attempts to find the result for a particular target, matching where the supplied string is _anywhere_ within the target name - eg: partial match. Returns nil if not found This will always return the _first_ thing found that matches, where multiple matches exist
type Series ¶
func (*Series) Max ¶
Max finds the maximum Y value from the data points within the series Will return 0 if no datapoints
func (*Series) Min ¶
Min finds the minimunm Y value from the data points within the series Will return 0 if no datapoints
func (*Series) Next ¶
NextItem can be called inside `for` and will populate the response to Current() Responds with true if a new Current() was found (hence you can call Current() to get it)