graphite

package
v0.0.13 Latest Latest
Warning

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

Go to latest
Published: Jan 22, 2018 License: Apache-2.0 Imports: 21 Imported by: 1

Documentation

Index

Constants

View Source
const (
	FormatCarbon            Format = 1
	FormatCarbonTags               = 2
	FormatCarbonOpenMetrics        = 3
)

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) (*prompb.ReadResponse, error)

Read implements the client.Reader interface.

func (*Client) Shutdown added in v0.0.13

func (c *Client) Shutdown()

Shutdowns the client.

func (*Client) String

func (c *Client) String() string

String implements the client.Client interface.

func (*Client) Write

func (c *Client) Write(samples model.Samples) 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 Format added in v0.0.13

type Format int

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

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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