Documentation ¶
Index ¶
Constants ¶
View Source
const ( // FindURL is the url for finding graphite metrics. FindURL = handler.RoutePrefixV1 + "/graphite/metrics/find" )
View Source
const ( // ReadURL is the url for the graphite query handler. ReadURL = handler.RoutePrefixV1 + "/graphite/render" )
Variables ¶
View Source
var ( // FindHTTPMethods is the HTTP methods used with this resource. FindHTTPMethods = []string{http.MethodGet, http.MethodPost} )
View Source
var ( // ReadHTTPMethods is the HTTP methods used with this resource. ReadHTTPMethods = []string{http.MethodGet, http.MethodPost} )
Functions ¶
func NewFindHandler ¶
NewFindHandler returns a new instance of handler.
func NewRenderHandler ¶
NewRenderHandler returns a new render handler around the given storage.
func WriteRenderResponse ¶
func WriteRenderResponse( w http.ResponseWriter, series ts.SeriesList, ) error
WriteRenderResponse writes the response to a render request
Types ¶
type RenderRequest ¶
type RenderRequest struct { Targets []string Format string From time.Time Until time.Time MaxDataPoints int64 Compare time.Duration Timeout time.Duration }
RenderRequest are the arguments to a render call.
func ParseRenderRequest ¶
func ParseRenderRequest(r *http.Request) (RenderRequest, error)
ParseRenderRequest parses the arguments to a render call from an incoming request.
Click to show internal directories.
Click to hide internal directories.