indicators

package
v0.0.0-...-af621d7 Latest Latest
Warning

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

Go to latest
Published: Aug 6, 2019 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Overview

*

  • Copyright 2017 ~ 2025 the original author or authors[983708408@qq.com]. *
  • Licensed under the Apache License, Version 2.0 (the "License");
  • you may not use this file except in compliance with the License.
  • You may obtain a copy of the License at *
  • http://www.apache.org/licenses/LICENSE-2.0 *
  • Unless required by applicable law or agreed to in writing, software
  • distributed under the License is distributed on an "AS IS" BASIS,
  • WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  • See the License for the specific language governing permissions and
  • limitations under the License.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Metric

type Metric struct {
	Metric               string            `protobuf:"bytes,1,opt,name=Metric,proto3" json:"Metric,omitempty"`
	Tags                 map[string]string `` /* 149-byte string literal not displayed */
	Value                float64           `protobuf:"fixed64,3,opt,name=Value,proto3" json:"Value,omitempty"`
	XXX_NoUnkeyedLiteral struct{}          `json:"-"`
	XXX_unrecognized     []byte            `json:"-"`
	XXX_sizecache        int32             `json:"-"`
}

func (*Metric) Descriptor

func (*Metric) Descriptor() ([]byte, []int)

func (*Metric) GetMetric

func (m *Metric) GetMetric() string

func (*Metric) GetTags

func (m *Metric) GetTags() map[string]string

func (*Metric) GetValue

func (m *Metric) GetValue() float64

func (*Metric) ProtoMessage

func (*Metric) ProtoMessage()

func (*Metric) Reset

func (m *Metric) Reset()

func (*Metric) String

func (m *Metric) String() string

func (*Metric) XXX_DiscardUnknown

func (m *Metric) XXX_DiscardUnknown()

func (*Metric) XXX_Marshal

func (m *Metric) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Metric) XXX_Merge

func (m *Metric) XXX_Merge(src proto.Message)

func (*Metric) XXX_Size

func (m *Metric) XXX_Size() int

func (*Metric) XXX_Unmarshal

func (m *Metric) XXX_Unmarshal(b []byte) error

type MetricAggregate

type MetricAggregate struct {
	Classify             string    `protobuf:"bytes,1,opt,name=classify,proto3" json:"classify,omitempty"`
	Instance             string    `protobuf:"bytes,2,opt,name=instance,proto3" json:"instance,omitempty"`
	Namespace            string    `protobuf:"bytes,3,opt,name=namespace,proto3" json:"namespace,omitempty"`
	Timestamp            int64     `protobuf:"varint,4,opt,name=timestamp,proto3" json:"timestamp,omitempty"`
	Metrics              []*Metric `protobuf:"bytes,5,rep,name=metrics,proto3" json:"metrics,omitempty"`
	XXX_NoUnkeyedLiteral struct{}  `json:"-"`
	XXX_unrecognized     []byte    `json:"-"`
	XXX_sizecache        int32     `json:"-"`
}

func (*MetricAggregate) Descriptor

func (*MetricAggregate) Descriptor() ([]byte, []int)

func (*MetricAggregate) GetClassify

func (m *MetricAggregate) GetClassify() string

func (*MetricAggregate) GetInstance

func (m *MetricAggregate) GetInstance() string

func (*MetricAggregate) GetMetrics

func (m *MetricAggregate) GetMetrics() []*Metric

func (*MetricAggregate) GetNamespace

func (m *MetricAggregate) GetNamespace() string

func (*MetricAggregate) GetTimestamp

func (m *MetricAggregate) GetTimestamp() int64

func (*MetricAggregate) ProtoMessage

func (*MetricAggregate) ProtoMessage()

func (*MetricAggregate) Reset

func (m *MetricAggregate) Reset()

func (*MetricAggregate) String

func (m *MetricAggregate) String() string

func (*MetricAggregate) XXX_DiscardUnknown

func (m *MetricAggregate) XXX_DiscardUnknown()

func (*MetricAggregate) XXX_Marshal

func (m *MetricAggregate) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*MetricAggregate) XXX_Merge

func (m *MetricAggregate) XXX_Merge(src proto.Message)

func (*MetricAggregate) XXX_Size

func (m *MetricAggregate) XXX_Size() int

func (*MetricAggregate) XXX_Unmarshal

func (m *MetricAggregate) XXX_Unmarshal(b []byte) error

type MetricAggregator

type MetricAggregator struct {
	MetricAggregate
}

Metric aggregate wrapper.

func NewMetricAggregator

func NewMetricAggregator(classify string) *MetricAggregator

New metric aggregator. Indicator names must be consistent with the global configuration, pay attention to case-sensitive (e.g., optional values: Redis, Kafka, Emq...), See: `./pkg/config/indicator_config.go#type[IndicatorProperties]` for names of members

func (*MetricAggregator) NewMetric

func (self *MetricAggregator) NewMetric(metricName string, value float64) *MetricWrapper

Create metrics with the creator.

func (*MetricAggregator) ToJSONString

func (self *MetricAggregator) ToJSONString() string

To metric aggregate json string.

func (*MetricAggregator) ToProtoBuf

func (self *MetricAggregator) ToProtoBuf() ([]byte, error)

To metric aggregate proto buffer.

func (*MetricAggregator) ToProtoBufArray

func (self *MetricAggregator) ToProtoBufArray() []byte

To metric aggregate proto buffer array.

type MetricWrapper

type MetricWrapper struct {
	Metric
}

Metric wrapper.

func (*MetricWrapper) ATag

func (self *MetricWrapper) ATag(key string, value string) *MetricWrapper

Metric tags appender.

Directories

Path Synopsis
* * Copyright 2017 ~ 2025 the original author or authors[983708408@qq.com].
* * Copyright 2017 ~ 2025 the original author or authors[983708408@qq.com].
* * Copyright 2017 ~ 2025 the original author or authors[983708408@qq.com].
* * Copyright 2017 ~ 2025 the original author or authors[983708408@qq.com].
* * Copyright 2017 ~ 2025 the original author or authors[983708408@qq.com].
* * Copyright 2017 ~ 2025 the original author or authors[983708408@qq.com].
* * Copyright 2017 ~ 2025 the original author or authors[983708408@qq.com].
* * Copyright 2017 ~ 2025 the original author or authors[983708408@qq.com].
* * Copyright 2017 ~ 2025 the original author or authors[983708408@qq.com].
* * Copyright 2017 ~ 2025 the original author or authors[983708408@qq.com].
* * Copyright 2017 ~ 2025 the original author or authors[983708408@qq.com].
* * Copyright 2017 ~ 2025 the original author or authors[983708408@qq.com].
* * Copyright 2017 ~ 2025 the original author or authors.
* * Copyright 2017 ~ 2025 the original author or authors.
* * Copyright 2017 ~ 2025 the original author or authors[983708408@qq.com].
* * Copyright 2017 ~ 2025 the original author or authors[983708408@qq.com].
* * Copyright 2017 ~ 2025 the original author or authors[983708408@qq.com].
* * Copyright 2017 ~ 2025 the original author or authors[983708408@qq.com].
* * Copyright 2017 ~ 2025 the original author or authors[983708408@qq.com].
* * Copyright 2017 ~ 2025 the original author or authors[983708408@qq.com].
* * Copyright 2017 ~ 2025 the original author or authors[983708408@qq.com].
* * Copyright 2017 ~ 2025 the original author or authors[983708408@qq.com].
* * Copyright 2017 ~ 2025 the original author or authors[983708408@qq.com].
* * Copyright 2017 ~ 2025 the original author or authors[983708408@qq.com].
* * Copyright 2017 ~ 2025 the original author or authors[983708408@qq.com].
* * Copyright 2017 ~ 2025 the original author or authors[983708408@qq.com].
* * Copyright 2017 ~ 2025 the original author or authors[983708408@qq.com].
* * Copyright 2017 ~ 2025 the original author or authors[983708408@qq.com].
* * Copyright 2017 ~ 2025 the original author or authors[983708408@qq.com].
* * Copyright 2017 ~ 2025 the original author or authors[983708408@qq.com].
* * Copyright 2017 ~ 2025 the original author or authors[983708408@qq.com].
* * Copyright 2017 ~ 2025 the original author or authors[983708408@qq.com].
* * Copyright 2017 ~ 2025 the original author or authors.
* * Copyright 2017 ~ 2025 the original author or authors.
* * Copyright 2017 ~ 2025 the original author or authors[983708408@qq.com].
* * Copyright 2017 ~ 2025 the original author or authors[983708408@qq.com].
* * Copyright 2017 ~ 2025 the original author or authors[983708408@qq.com].
* * Copyright 2017 ~ 2025 the original author or authors[983708408@qq.com].

Jump to

Keyboard shortcuts

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