Documentation ¶
Index ¶
- Variables
- func AddCustomHeader(key, value string)
- func GetLastNonNullValue(pp *Series, maxNullPoints int) (t int64, v float64, absent bool)
- func SetHTTPClient(client *http.Client)
- func SetUserAgent(ua string)
- type DataPoint
- type EvalCmp
- type Query
- type RenderEval
- type RenderQuery
- func (q *RenderQuery) AddTarget(target string) *RenderQuery
- func (q *RenderQuery) Request(ctx context.Context) ([]Series, error)
- func (q *RenderQuery) SetBasicAuth(username, password string)
- func (q *RenderQuery) SetFrom(from string) *RenderQuery
- func (q *RenderQuery) SetMaxDataPoints(maxDataPoints int) *RenderQuery
- func (q *RenderQuery) SetTargets(targets []string) *RenderQuery
- func (q *RenderQuery) SetUntil(until string) *RenderQuery
- func (q *RenderQuery) URL() (*url.URL, error)
- type Response
- type Series
Constants ¶
This section is empty.
Variables ¶
Functions ¶
func AddCustomHeader ¶
func AddCustomHeader(key, value string)
AddCustomHeader adds a custom header on all requests
func GetLastNonNullValue ¶
GetLastNonNullValue searches for the latest non null value, and skips at most maxNullPoints. If the last maxNullPoints values are all absent, returns absent
func SetHTTPClient ¶
SetHTTPClient sets the http client used to make requests
Types ¶
type RenderEval ¶
type RenderEval struct {
// contains filtered or unexported fields
}
func NewRenderEval ¶
func NewRenderEval(base, from, until, eval string, maxDataPoints int, maxNullPoints int) (*RenderEval, error)
func (*RenderEval) Eval ¶
func (e *RenderEval) Eval(ctx context.Context) ([]types.EvalResult, error)
func (*RenderEval) SetBasicAuth ¶
func (e *RenderEval) SetBasicAuth(username, password string)
func (*RenderEval) String ¶
func (e *RenderEval) String() string
func (*RenderEval) Type ¶ added in v0.0.3
func (e *RenderEval) Type() string
type RenderQuery ¶
type RenderQuery struct { Base string // base url of graphite server User string // user Password string // password Targets []string From string Until string MaxDataPoints int }
RenderQuery is used to build `/render/` query
func NewRenderQuery ¶
func NewRenderQuery(base, from, until string, targets []string, maxDataPoints int) *RenderQuery
NewRenderQuery returns a RenderQuery instance
func (*RenderQuery) AddTarget ¶
func (q *RenderQuery) AddTarget(target string) *RenderQuery
func (*RenderQuery) Request ¶
func (q *RenderQuery) Request(ctx context.Context) ([]Series, error)
Request implements Query interface
func (*RenderQuery) SetBasicAuth ¶
func (q *RenderQuery) SetBasicAuth(username, password string)
func (*RenderQuery) SetFrom ¶
func (q *RenderQuery) SetFrom(from string) *RenderQuery
func (*RenderQuery) SetMaxDataPoints ¶
func (q *RenderQuery) SetMaxDataPoints(maxDataPoints int) *RenderQuery
func (*RenderQuery) SetTargets ¶
func (q *RenderQuery) SetTargets(targets []string) *RenderQuery
func (*RenderQuery) SetUntil ¶
func (q *RenderQuery) SetUntil(until string) *RenderQuery
Source Files ¶
Click to show internal directories.
Click to hide internal directories.