Index | Files

package graphite

import ""

Package graphite defines structures for interacting with a Graphite server.


Package Files



var DefaultClient = &http.Client{
    Timeout: time.Minute,

DefaultClient is the default HTTP client for requests.

type Context Uses

type Context interface {
    Query(*Request) (Response, error)

Context is the interface for querying a Graphite server.

type DataPoint Uses

type DataPoint []json.Number

type Host Uses

type Host string

Host is a simple Graphite Context with no additional features.

func (Host) Query Uses

func (h Host) Query(r *Request) (Response, error)

Query performs a request to a Graphite server.

type HostHeader Uses

type HostHeader struct {
    Host   string
    Header http.Header

func (HostHeader) Query Uses

func (h HostHeader) Query(r *Request) (Response, error)

type Request Uses

type Request struct {
    Start   *time.Time
    End     *time.Time
    Targets []string
    URL     *url.URL

Request holds query objects. Currently only absolute times are supported.

func (*Request) CacheKey Uses

func (r *Request) CacheKey() string

func (*Request) Query Uses

func (r *Request) Query(host string, header http.Header) (Response, error)

Query performs a request to Graphite at the given host. host specifies a hostname with optional port, and may optionally begin with a scheme (http, https) to specify the protocol (http is the default). header is the headers to send.

type Response Uses

type Response []Series

type Series Uses

type Series struct {
    Datapoints []DataPoint
    Target     string

Package graphite imports 7 packages (graph) and is imported by 7 packages. Updated 2016-07-15. Refresh now. Tools for package owners.