graphite

package
v0.15.15 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 21, 2020 License: Apache-2.0 Imports: 32 Imported by: 5 modules, 2 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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 are the HTTP methods for this handler.
	FindHTTPMethods = []string{http.MethodGet, http.MethodPost}
)
View Source
var (
	// ReadHTTPMethods are the HTTP methods used with this resource.
	ReadHTTPMethods = []string{http.MethodGet, http.MethodPost}
)

Functions

func NewFindHandler

func NewFindHandler(opts options.HandlerOptions) http.Handler

NewFindHandler returns a new instance of handler.

func NewRenderHandler

func NewRenderHandler(opts options.HandlerOptions) http.Handler

NewRenderHandler returns a new render handler around the given storage.

func WriteRenderResponse

func WriteRenderResponse(
	w http.ResponseWriter,
	series ts.SeriesList,
	format string,
) 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.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL