graphite

package
v0.4.1 Latest Latest
Warning

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

Go to latest
Published: Aug 4, 2020 License: Apache-2.0 Imports: 20 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 {
	// contains filtered or unexported fields
}

Client allows sending batches of Prometheus samples to Graphite.

func NewClient

func NewClient(cfg *config.Config, logger log.Logger) *Client

NewClient returns a new Client.

func (*Client) Name

func (c *Client) Name() string

Name implements the client.Client interface.

func (*Client) Read

func (c *Client) Read(req *prompb.ReadRequest, r *http.Request) (*prompb.ReadResponse, error)

Read implements the client.Reader interface.

func (*Client) Shutdown added in v0.0.13

func (c *Client) Shutdown()

Shutdown the client.

func (*Client) String

func (c *Client) String() string

String implements the client.Client interface.

func (*Client) Target added in v0.3.0

func (c *Client) Target() string

Target respond with a more low level representation of the client's remote

func (*Client) Write

func (c *Client) Write(samples model.Samples, r *http.Request, dryRun bool) ([]byte, error)

Write implements the client.Writer interface.

type Datapoint

type Datapoint struct {
	Value     *float64
	Timestamp int64
}

Datapoint pairs a timestamp to a value.

func (*Datapoint) UnmarshalJSON

func (d *Datapoint) UnmarshalJSON(b []byte) error

UnmarshalJSON unmarshals a Datapoint from json

type ExpandResponse

type ExpandResponse struct {
	Results []string `yaml:"results,omitempty" json:"results,omitempty"`
}

ExpandResponse is a parsed response of graphite expand endpoint.

type RenderResponse

type RenderResponse struct {
	Target     string       `yaml:"target,omitempty" json:"target,omitempty"`
	Datapoints []*Datapoint `yaml:"datapoints,omitempty" json:"datapoints,omitempty"`
	Tags       Tags         `yaml:"tags,omitempty" json:"tags,omitempty"`
}

RenderResponse is a single parsed element of graphite render endpoint.

type Tags added in v0.0.13

type Tags map[string]string

Tags mapping.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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