metrics

package
v1.7.2 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Exporter

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

func NewExporter

func NewExporter() (*Exporter, error)

func (*Exporter) PrometheusHandler

func (e *Exporter) PrometheusHandler() http.Handler

func (*Exporter) Report

func (e *Exporter) Report(m *Report)

type Report

type Report struct {
	Key            string  `json:"-"`
	Binding        string  `json:"binding"`
	SourceKind     string  `json:"source_kind"`
	TargetKind     string  `json:"target_kind"`
	RequestCount   float64 `json:"request_count"`
	RequestVolume  float64 `json:"request_volume"`
	ResponseCount  float64 `json:"response_count"`
	ResponseVolume float64 `json:"response_volume"`
	ErrorsCount    float64 `json:"errors_count"`
}

func (*Report) Clone

func (m *Report) Clone() *Report

type Store

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

func NewStore

func NewStore() *Store

func (*Store) Add

func (s *Store) Add(report *Report)

func (*Store) Get

func (s *Store) Get(key string) *Report

func (*Store) List

func (s *Store) List() []*Report

Jump to

Keyboard shortcuts

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