types

package
v0.12.1 Latest Latest
Warning

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

Go to latest
Published: Oct 13, 2023 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ErrCodeCollectorNotFound                 router.ErrCode = "collector_not_found"
	ErrCodeVisualizerNotFound                router.ErrCode = "visualizer_not_found"
	ErrCodeFailedToConfigureMetricsContainer router.ErrCode = "failed_to_configure_metrics_container"
)
View Source
const (
	MetricStatusOff float64 = 0.0
	MetricStatusOn  float64 = 1.0
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Metric

type Metric struct {
	ID          string     `json:"id"`
	Name        string     `json:"name"`
	Description string     `json:"description,omitempty"`
	Type        MetricType `json:"type,omitempty"`
	Labels      []string   `json:"labels,omitempty"`
}

type MetricType

type MetricType string
const (
	MetricTypeOnOff   MetricType = "metric_type_on_off"
	MetricTypeInteger MetricType = "metric_type_number"
)

type MetricsAdapterPort

type MetricsAdapterPort interface {
	// ConfigureContainer configures an container to monitor the metrics of Vertex.
	ConfigureContainer(uuid uuid.UUID) error

	// RegisterMetrics registers the metrics that can be monitored.
	RegisterMetrics(metrics []Metric)

	Set(metricID string, value interface{}, labels ...string)
	Inc(metricID string, labels ...string)
	Dec(metricID string, labels ...string)
}

Jump to

Keyboard shortcuts

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