Versions in this module Expand all Collapse all v1 v1.0.0 Jul 30, 2020 Changes in this version + var ErrInvalidInput = errors.New("invalid input") v0 v0.13.1 Nov 28, 2019 v0.13.0 Sep 17, 2019 Changes in this version + var ErrInvalidEmptyName = errors.New("name cannot be empty") + var ErrInvalidFormat = errors.New("invalid format") + var ErrInvalidIntervalzero = errors.New("interval cannot be 0") + var ErrInvalidMtype = errors.New("invalid mtype") + var ErrInvalidOrgIdzero = errors.New("org-id cannot be 0") + var ErrInvalidTagFormat = errors.New("invalid tag format") + var ErrStringTooShort = errors.New("string too short") + var ErrUnknownPartitionMethod = errors.New("unknown partition method") + func EatDots(name string) string + func IsSpanValid(span uint32) bool + func Reslice(in []*MetricData, size int) [][]*MetricData + func SanitizeNameAsTagValue(name string) string + func ValidateTag(tag string) bool + func ValidateTagKey(key string) bool + func ValidateTagValue(value string) bool + func ValidateTags(tags []string) bool + type AMKey struct + Archive Archive + MKey MKey + func AMKeyFromString(s string) (AMKey, error) + func GetAMKey(m MKey, method Method, span uint32) AMKey + func (a AMKey) String() string + type Archive uint16 + func ArchiveFromString(s string) (Archive, error) + func NewArchive(method Method, span uint32) Archive + func (a Archive) Method() Method + func (a Archive) Span() uint32 + func (a Archive) String() string + func (z *Archive) DecodeMsg(dc *msgp.Reader) (err error) + func (z *Archive) UnmarshalMsg(bts []byte) (o []byte, err error) + func (z Archive) EncodeMsg(en *msgp.Writer) (err error) + func (z Archive) MarshalMsg(b []byte) (o []byte, err error) + func (z Archive) Msgsize() (s int) + type Key [16]byte + func (z *Key) DecodeMsg(dc *msgp.Reader) (err error) + func (z *Key) EncodeMsg(en *msgp.Writer) (err error) + func (z *Key) MarshalMsg(b []byte) (o []byte, err error) + func (z *Key) Msgsize() (s int) + func (z *Key) UnmarshalMsg(bts []byte) (o []byte, err error) + type MKey struct + Key Key + Org uint32 + func MKeyFromString(s string) (MKey, error) + func (m MKey) String() string + func (z *MKey) DecodeMsg(dc *msgp.Reader) (err error) + func (z *MKey) EncodeMsg(en *msgp.Writer) (err error) + func (z *MKey) MarshalMsg(b []byte) (o []byte, err error) + func (z *MKey) Msgsize() (s int) + func (z *MKey) UnmarshalMsg(bts []byte) (o []byte, err error) + type Method uint8 + const Avg + const Cnt + const Lst + const Max + const Min + const Sum + func MethodFromString(input string) (Method, error) + func (i Method) String() string + type MetricData struct + Id string + Interval int + Mtype string + Name string + OrgId int + Tags []string + Time int64 + Unit string + Value float64 + func (m *MetricData) PartitionID(method PartitionByMethod, partitions int32) (int32, error) + func (m *MetricData) SetId() + func (m *MetricData) Validate() error + func (z *MetricData) DecodeMsg(dc *msgp.Reader) (err error) + func (z *MetricData) EncodeMsg(en *msgp.Writer) (err error) + func (z *MetricData) MarshalMsg(b []byte) (o []byte, err error) + func (z *MetricData) Msgsize() (s int) + func (z *MetricData) UnmarshalMsg(bts []byte) (o []byte, err error) + type MetricDataArray []*MetricData + func (z *MetricDataArray) DecodeMsg(dc *msgp.Reader) (err error) + func (z *MetricDataArray) UnmarshalMsg(bts []byte) (o []byte, err error) + func (z MetricDataArray) EncodeMsg(en *msgp.Writer) (err error) + func (z MetricDataArray) MarshalMsg(b []byte) (o []byte, err error) + func (z MetricDataArray) Msgsize() (s int) + type MetricDefinition struct + Id MKey + Interval int + LastUpdate int64 + Mtype string + Name string + OrgId uint32 + Partition int32 + Tags []string + Unit string + func MetricDefinitionFromMetricData(d *MetricData) *MetricDefinition + func (m *MetricDefinition) Clone() MetricDefinition + func (m *MetricDefinition) NameSanitizedAsTagValue() string + func (m *MetricDefinition) NameWithTags() string + func (m *MetricDefinition) PartitionID(method PartitionByMethod, partitions int32) (int32, error) + func (m *MetricDefinition) SetId() + func (m *MetricDefinition) Validate() error + func (z *MetricDefinition) DecodeMsg(dc *msgp.Reader) (err error) + func (z *MetricDefinition) EncodeMsg(en *msgp.Writer) (err error) + func (z *MetricDefinition) MarshalMsg(b []byte) (o []byte, err error) + func (z *MetricDefinition) Msgsize() (s int) + func (z *MetricDefinition) UnmarshalMsg(bts []byte) (o []byte, err error) + type MetricPoint struct + MKey MKey + Time uint32 + Value float64 + func (m *MetricPoint) Marshal(b []byte) (o []byte, err error) + func (m *MetricPoint) Marshal32(b []byte) (o []byte, err error) + func (m *MetricPoint) MarshalWithoutOrg(b []byte) (o []byte, err error) + func (m *MetricPoint) MarshalWithoutOrg28(b []byte) (o []byte, err error) + func (m *MetricPoint) Unmarshal(bts []byte) (o []byte, err error) + func (m *MetricPoint) UnmarshalWithoutOrg(bts []byte) (o []byte, err error) + func (m *MetricPoint) Valid() bool + type PartitionByMethod uint8 + const PartitionByOrg + const PartitionBySeries + const PartitionBySeriesWithTags + const PartitionBySeriesWithTagsFnv + func PartitonMethodFromString(input string) (PartitionByMethod, error) + type PartitionedMetric interface + PartitionID func(method PartitionByMethod, partitions int32) (int32, error) + SetId func() + Validate func() error + type Point struct + Ts uint32 + Val float64 + func (z *Point) DecodeMsg(dc *msgp.Reader) (err error) + func (z *Point) UnmarshalMsg(bts []byte) (o []byte, err error) + func (z Point) EncodeMsg(en *msgp.Writer) (err error) + func (z Point) MarshalMsg(b []byte) (o []byte, err error) + func (z Point) Msgsize() (s int)