metric

package
v0.0.0-...-51fd5d7 Latest Latest
Warning

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

Go to latest
Published: Apr 28, 2023 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrInvalidParseType = errors.New("invalid parse type")
)

Functions

func ParseBool

func ParseBool(b bool, t MetricType) (any, error)

func ParseFloat64

func ParseFloat64(f float64, t MetricType) (any, error)

func ParseInt

func ParseInt(i int, t MetricType) (any, error)

func ParseString

func ParseString(s string, t MetricType) (any, error)

func ParseValue

func ParseValue(v any, t MetricType) (any, error)

func ValidateMetricType

func ValidateMetricType(t MetricType) bool

ValidateMetricType validates the metric type.

Types

type MetricType

type MetricType byte
const (
	Unknown MetricType = iota
	Int
	Float
	String
	Bool
	Invalid
)

func ParseAsn1BER

func ParseAsn1BER(b byte) MetricType

Parse Asn1BER type to Metric type.

Jump to

Keyboard shortcuts

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