json

package
v0.27.1 Latest Latest
Warning

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

Go to latest
Published: Jul 30, 2020 License: AGPL-3.0 Imports: 11 Imported by: 0

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() stats.SystemTagSet

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