metricline

package
v0.0.0-...-1d907cd Latest Latest
Warning

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

Go to latest
Published: Jan 11, 2024 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Pretty

func Pretty(pretty bool) func(*MetricGrammar) error

func Size

func Size(size int) func(*MetricGrammar) error

Types

type Diff

type Diff struct {
	Missing  []*Metric
	Extra    []*Metric
	Unwanted []*Metric
}

func DiffMetrics

func DiffMetrics(expected, excluded, actual []*Metric) *Diff

type Metric

type Metric struct {
	Name      string
	Value     string
	Timestamp string
	Tags      map[string]string
	Buckets   map[string]string
}

func Parse

func Parse(line string) (*Metric, error)

type MetricGrammar

type MetricGrammar struct {
	Histogram bool
	Buckets   map[string]string

	Name      string
	Value     string
	Timestamp string
	Tags      map[string]string

	Buffer string

	Pretty bool
	// contains filtered or unexported fields
}

func (*MetricGrammar) AST

func (t *MetricGrammar) AST() *node32

func (*MetricGrammar) Add

func (t *MetricGrammar) Add(rule pegRule, begin, end, index uint32)

func (*MetricGrammar) Execute

func (p *MetricGrammar) Execute()

func (*MetricGrammar) Init

func (p *MetricGrammar) Init(options ...func(*MetricGrammar) error) error

func (*MetricGrammar) Parse

func (p *MetricGrammar) Parse(rule ...int) error

func (*MetricGrammar) PrettyPrintSyntaxTree

func (t *MetricGrammar) PrettyPrintSyntaxTree(buffer string)

func (*MetricGrammar) Print

func (t *MetricGrammar) Print()

func (*MetricGrammar) PrintSyntaxTree

func (p *MetricGrammar) PrintSyntaxTree()

func (*MetricGrammar) Reset

func (p *MetricGrammar) Reset()

func (*MetricGrammar) SprintSyntaxTree

func (p *MetricGrammar) SprintSyntaxTree() string

func (*MetricGrammar) Tokens

func (t *MetricGrammar) Tokens() []token32

func (*MetricGrammar) Trim

func (t *MetricGrammar) Trim(length uint32)

func (*MetricGrammar) WriteSyntaxTree

func (p *MetricGrammar) WriteSyntaxTree(w io.Writer)

type Store

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

func NewStore

func NewStore() *Store

func (*Store) BadMetrics

func (s *Store) BadMetrics() []string

func (*Store) LogBadMetric

func (s *Store) LogBadMetric(metric string)

func (*Store) LogMetric

func (s *Store) LogMetric(metric *Metric)

func (*Store) Metrics

func (s *Store) Metrics() []*Metric

func (*Store) Subscribe

func (s *Store) Subscribe(b *broadcaster.Broadcaster[string])

Jump to

Keyboard shortcuts

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