graphite

package
v0.0.0-...-c0ac931 Latest Latest
Warning

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

Go to latest
Published: Aug 23, 2020 License: Apache-2.0 Imports: 6 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
	HTTP     *http.Client
	Host     string
	Username string
	Password string
}

Client wraps http.Client so the consumer doesn't have to

func NewClient

func NewClient(url, username, password string) *Client

NewClient creates a new Graphite client, including a custom net/http client

func (*Client) Render

func (c *Client) Render(metric string) (RenderResponse, error)

Render makes a call to the Graphite /render endpoint: https://graphite-api.readthedocs.io/en/latest/api.html

type RenderResponse

type RenderResponse struct {
	Target     string      `json:"target"`
	Datapoints [][]float64 `json:"datapoints"`
}

Jump to

Keyboard shortcuts

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