Versions in this module Expand all Collapse all v1 v1.1.7 Apr 1, 2021 Changes in this version + const AddressLabel + const AlertNameLabel + const BucketLabel + const Earliest + const ExportedLabelPrefix + const InstanceLabel + const JobLabel + const Latest + const MetaLabelPrefix + const MetricNameLabel + const MetricsPathLabel + const ParamLabelPrefix + const QuantileLabel + const ReservedLabelPrefix + const SchemeLabel + const SeparatorByte + const TmpLabelPrefix + var LabelNameRE = regexp.MustCompile("^[a-zA-Z_][a-zA-Z0-9_]*$") + var MetricNameRE = regexp.MustCompile(`^[a-zA-Z_:][a-zA-Z0-9_:]*$`) + var ZeroSample = Sample + var ZeroSamplePair = SamplePair + func IsValidMetricName(n LabelValue) bool + func LabelsToSignature(labels map[string]string) uint64 + func SignatureForLabels(m Metric, labels ...LabelName) uint64 + func SignatureWithoutLabels(m Metric, labels map[LabelName]struct{}) uint64 + type Alert struct + Annotations LabelSet + EndsAt time.Time + GeneratorURL string + Labels LabelSet + StartsAt time.Time + func (a *Alert) Fingerprint() Fingerprint + func (a *Alert) Name() string + func (a *Alert) Resolved() bool + func (a *Alert) ResolvedAt(ts time.Time) bool + func (a *Alert) Status() AlertStatus + func (a *Alert) String() string + func (a *Alert) Validate() error + type AlertStatus string + const AlertFiring + const AlertResolved + type Alerts []*Alert + func (as Alerts) HasFiring() bool + func (as Alerts) Len() int + func (as Alerts) Less(i, j int) bool + func (as Alerts) Status() AlertStatus + func (as Alerts) Swap(i, j int) + type Duration time.Duration + func ParseDuration(durationStr string) (Duration, error) + func (d *Duration) MarshalText() ([]byte, error) + func (d *Duration) Set(s string) error + func (d *Duration) Type() string + func (d *Duration) UnmarshalText(text []byte) error + func (d *Duration) UnmarshalYAML(unmarshal func(interface{}) error) error + func (d Duration) MarshalYAML() (interface{}, error) + func (d Duration) String() string + type Fingerprint uint64 + func FingerprintFromString(s string) (Fingerprint, error) + func ParseFingerprint(s string) (Fingerprint, error) + func (f Fingerprint) String() string + type FingerprintSet map[Fingerprint]struct + func (s FingerprintSet) Equal(o FingerprintSet) bool + func (s FingerprintSet) Intersection(o FingerprintSet) FingerprintSet + type Fingerprints []Fingerprint + func (f Fingerprints) Len() int + func (f Fingerprints) Less(i, j int) bool + func (f Fingerprints) Swap(i, j int) + type Interval struct + End Time + Start Time + type LabelName string + func (ln *LabelName) UnmarshalJSON(b []byte) error + func (ln *LabelName) UnmarshalYAML(unmarshal func(interface{}) error) error + func (ln LabelName) IsValid() bool + type LabelNames []LabelName + func (l LabelNames) Len() int + func (l LabelNames) Less(i, j int) bool + func (l LabelNames) String() string + func (l LabelNames) Swap(i, j int) + type LabelPair struct + Name LabelName + Value LabelValue + type LabelPairs []*LabelPair + func (l LabelPairs) Len() int + func (l LabelPairs) Less(i, j int) bool + func (l LabelPairs) Swap(i, j int) + type LabelSet map[LabelName]LabelValue + func (l *LabelSet) UnmarshalJSON(b []byte) error + func (l LabelSet) Merge(other LabelSet) LabelSet + func (l LabelSet) String() string + func (ls LabelSet) Before(o LabelSet) bool + func (ls LabelSet) Clone() LabelSet + func (ls LabelSet) Equal(o LabelSet) bool + func (ls LabelSet) FastFingerprint() Fingerprint + func (ls LabelSet) Fingerprint() Fingerprint + func (ls LabelSet) Validate() error + type LabelValue string + func (lv LabelValue) IsValid() bool + type LabelValues []LabelValue + func (l LabelValues) Len() int + func (l LabelValues) Less(i, j int) bool + func (l LabelValues) Swap(i, j int) + type Matcher struct + IsRegex bool + Name LabelName + Value string + func (m *Matcher) UnmarshalJSON(b []byte) error + func (m *Matcher) Validate() error + type Matrix []*SampleStream + func (Matrix) Type() ValueType + func (m Matrix) Len() int + func (m Matrix) Less(i, j int) bool + func (m Matrix) Swap(i, j int) + func (mat Matrix) String() string + type Metric LabelSet + func (m Metric) Before(o Metric) bool + func (m Metric) Clone() Metric + func (m Metric) Equal(o Metric) bool + func (m Metric) FastFingerprint() Fingerprint + func (m Metric) Fingerprint() Fingerprint + func (m Metric) String() string + type Sample struct + Metric Metric + Timestamp Time + Value SampleValue + func (s *Sample) Equal(o *Sample) bool + func (s *Sample) UnmarshalJSON(b []byte) error + func (s Sample) MarshalJSON() ([]byte, error) + func (s Sample) String() string + type SamplePair struct + Timestamp Time + Value SampleValue + func (s *SamplePair) Equal(o *SamplePair) bool + func (s *SamplePair) UnmarshalJSON(b []byte) error + func (s SamplePair) MarshalJSON() ([]byte, error) + func (s SamplePair) String() string + type SampleStream struct + Metric Metric + Values []SamplePair + func (ss SampleStream) String() string + type SampleValue float64 + func (v *SampleValue) UnmarshalJSON(b []byte) error + func (v SampleValue) Equal(o SampleValue) bool + func (v SampleValue) MarshalJSON() ([]byte, error) + func (v SampleValue) String() string + type Samples []*Sample + func (s Samples) Equal(o Samples) bool + func (s Samples) Len() int + func (s Samples) Less(i, j int) bool + func (s Samples) Swap(i, j int) + type Scalar struct + Timestamp Time + Value SampleValue + func (*Scalar) Type() ValueType + func (s *Scalar) UnmarshalJSON(b []byte) error + func (s Scalar) MarshalJSON() ([]byte, error) + func (s Scalar) String() string + type Silence struct + Comment string + CreatedAt time.Time + CreatedBy string + EndsAt time.Time + ID uint64 + Matchers []*Matcher + StartsAt time.Time + func (s *Silence) Validate() error + type String struct + Timestamp Time + Value string + func (*String) Type() ValueType + func (s *String) String() string + func (s *String) UnmarshalJSON(b []byte) error + func (s String) MarshalJSON() ([]byte, error) + type Time int64 + func Now() Time + func TimeFromUnix(t int64) Time + func TimeFromUnixNano(t int64) Time + func (t *Time) UnmarshalJSON(b []byte) error + func (t Time) Add(d time.Duration) Time + func (t Time) After(o Time) bool + func (t Time) Before(o Time) bool + func (t Time) Equal(o Time) bool + func (t Time) MarshalJSON() ([]byte, error) + func (t Time) String() string + func (t Time) Sub(o Time) time.Duration + func (t Time) Time() time.Time + func (t Time) Unix() int64 + func (t Time) UnixNano() int64 + type Value interface + String func() string + Type func() ValueType + type ValueType int + const ValMatrix + const ValNone + const ValScalar + const ValString + const ValVector + func (e ValueType) String() string + func (et *ValueType) UnmarshalJSON(b []byte) error + func (et ValueType) MarshalJSON() ([]byte, error) + type Vector []*Sample + func (Vector) Type() ValueType + func (vec Vector) Equal(o Vector) bool + func (vec Vector) Len() int + func (vec Vector) Less(i, j int) bool + func (vec Vector) String() string + func (vec Vector) Swap(i, j int)