Documentation ¶
Index ¶
- func LabelsToMetric(ls labels.Labels) model.Metric
- func MapToModelLabelSet(m map[string]string) model.LabelSet
- func ModelLabelSetToMap(m model.LabelSet) map[string]string
- func RoundToMilliseconds(from, through time.Time) (model.Time, model.Time)
- type ByteSize
- func (bs ByteSize) Get() interface{}
- func (bs *ByteSize) MarshalJSON() ([]byte, error)
- func (bs *ByteSize) MarshalYAML() (interface{}, error)
- func (bs *ByteSize) Set(s string) error
- func (bs ByteSize) String() string
- func (bs *ByteSize) UnmarshalJSON(val []byte) error
- func (bs *ByteSize) UnmarshalYAML(unmarshal func(interface{}) error) error
- func (bs ByteSize) Val() int
- type LabelSet
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func LabelsToMetric ¶
LabelsToMetric converts a Labels to Metric Don't do this on any performance sensitive paths.
func MapToModelLabelSet ¶
MapToModelLabelSet converts a map into a model.LabelSet
func ModelLabelSetToMap ¶
ModelLabelSetToMap convert a model.LabelSet to a map[string]string
Types ¶
type ByteSize ¶
type ByteSize uint64
ByteSize is a flag parsing compatibility type for constructing human friendly sizes. It implements flag.Value & flag.Getter.
func (*ByteSize) MarshalJSON ¶
Use a string representation for consistency
func (*ByteSize) MarshalYAML ¶
MarshalYAML implements yaml.Marshaller. Use a string representation for consistency
func (*ByteSize) UnmarshalJSON ¶
UnmarshalJSON implements json.Unmarsal interface to work with JSON.
func (*ByteSize) UnmarshalYAML ¶
UnmarshalYAML the Unmarshaler interface of the yaml pkg.
type LabelSet ¶
LabelSet is a labelSet that can be used as a flag.
func (LabelSet) MarshalYAML ¶
MarshalYAML implements yaml.Marshaller.
func (*LabelSet) UnmarshalYAML ¶
UnmarshalYAML the Unmarshaler interface of the yaml pkg.