metrics

package
v0.358.0 Latest Latest
Warning

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

Go to latest
Published: Sep 30, 2024 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

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

Client is a collection of metrics.

func NewClient

func NewClient(window time.Duration) *Client

NewClient creates a new collection of metrics.

func (*Client) Add

func (c *Client) Add(modelID string, v float64)

Add adds a value to a given metric.

func (*Client) Get

func (c *Client) Get(modelID string) float64

Get returns the value of a given metric.

type Collector added in v0.294.0

type Collector interface {
	Add(modelID string, v float64)
}

Collector is the interface for collecting metrics.

type Provider added in v0.294.0

type Provider interface {
	Get(modelID string) float64
}

Provider is the interface for providing metric values.

Jump to

Keyboard shortcuts

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