format

package
Version: v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Jun 5, 2020 License: ISC Imports: 9 Imported by: 2

Documentation

Overview

Package format provides utilities to format metrics and notifications in various formats.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Graphite

type Graphite struct {
	W                 io.Writer
	Prefix, Suffix    string
	EscapeChar        string
	SeparateInstances bool
	AlwaysAppendDS    bool // TODO(octo): Implement support.
	// contains filtered or unexported fields
}

Graphite implements the Writer interface and writes ValueLists in Graphite format to W.

func (*Graphite) Write

func (g *Graphite) Write(_ context.Context, vl *api.ValueList) error

Write formats the ValueList in the PUTVAL format and writes it to the assiciated io.Writer.

type Putval

type Putval struct {
	// contains filtered or unexported fields
}

Putval implements the Writer interface for PUTVAL formatted output.

func NewPutval

func NewPutval(w io.Writer) *Putval

NewPutval returns a new Putval object writing to the provided io.Writer.

func (*Putval) Write

func (p *Putval) Write(_ context.Context, vl *api.ValueList) error

Write formats the ValueList in the PUTVAL format and writes it to the assiciated io.Writer.

Jump to

Keyboard shortcuts

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