json

package
v0.0.0-...-deba56b Latest Latest
Warning

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

Go to latest
Published: Nov 29, 2023 License: AGPL-3.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New(params output.Params) (output.Output, error)

New returns a new JSON output.

Types

type Output

type Output struct {
	output.SampleBuffer
	// contains filtered or unexported fields
}

Output funnels all passed metrics to an (optionally gzipped) JSON file.

func (*Output) Description

func (o *Output) Description() string

Description returns a human-readable description of the output.

func (*Output) SetThresholds

func (o *Output) SetThresholds(thresholds map[string]metrics.Thresholds)

SetThresholds receives the thresholds before the output is Start()-ed.

func (*Output) Start

func (o *Output) Start() error

Start tries to open the specified JSON file and starts the goroutine for metric flushing. If gzip encoding is specified, it also handles that.

func (*Output) Stop

func (o *Output) Stop() error

Stop flushes any remaining metrics and stops the goroutine.

Jump to

Keyboard shortcuts

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