metric

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Jan 15, 2023 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Account

type Account struct {
	AuthKey string `json:"auth_key"`
	URL     string `json:"url"`
}

Account struct

type Device

type Device struct {
	ID         string `json:"id"`
	ShellyName string `json:"shelly_name"`
	Name       string `json:"name"`
}

Device struct

type Metric

type Metric struct {
	ShellyType string   `json:"type"`
	ResultKey  string   `json:"resultKey"`
	FqName     string   `json:"fqName"`
	Help       string   `json:"help"`
	Labels     []string `json:"labels"`

	MetricResult []map[string]interface{}

	PromType   prometheus.ValueType
	PromDesc   *prometheus.Desc
	PromResult []*PrometheusResult
}

Metric struct

type MetricsFile

type MetricsFile struct {
	Metrics  []*Metric   `json:"metrics"`
	Products []*Products `json:"products"`
	Account  *Account    `json:"account"`
}

MetricsFile struct

type Products

type Products struct {
	Type    string            `json:"type"`
	Devices []*Device         `json:"devices"`
	Export  map[string]string `json:"export"`
}

Products struct

type PrometheusResult

type PrometheusResult struct {
	PromDesc      *prometheus.Desc
	PromValueType prometheus.ValueType
	Value         float64
	LabelValues   []string
}

PrometheusResult struct

Jump to

Keyboard shortcuts

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