json

package
v0.25.0 Latest Latest
Warning

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

Go to latest
Published: Jul 31, 2019 License: AGPL-3.0 Imports: 9 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Collector

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

func New

func New(fs afero.Fs, fname string) (*Collector, error)

func (*Collector) Collect

func (c *Collector) Collect(scs []stats.SampleContainer)

func (*Collector) GetRequiredSystemTags added in v0.20.0

func (c *Collector) GetRequiredSystemTags() lib.TagSet

GetRequiredSystemTags returns which sample tags are needed by this collector

func (*Collector) HandleMetric

func (c *Collector) HandleMetric(m *stats.Metric)

func (*Collector) HasSeenMetric

func (c *Collector) HasSeenMetric(str string) bool

func (*Collector) Init added in v0.12.2

func (c *Collector) Init() error
func (c *Collector) Link() string

func (*Collector) Run

func (c *Collector) Run(ctx context.Context)

func (*Collector) SetRunStatus added in v0.21.1

func (c *Collector) SetRunStatus(status lib.RunStatus)

type Envelope

type Envelope struct {
	Type   string      `json:"type"`
	Data   interface{} `json:"data"`
	Metric string      `json:"metric,omitempty"`
}

func WrapMetric

func WrapMetric(metric *stats.Metric) *Envelope

func WrapSample

func WrapSample(sample *stats.Sample) *Envelope

type JSONSample

type JSONSample struct {
	Time  time.Time         `json:"time"`
	Value float64           `json:"value"`
	Tags  *stats.SampleTags `json:"tags"`
}

func NewJSONSample

func NewJSONSample(sample *stats.Sample) *JSONSample

Jump to

Keyboard shortcuts

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