Documentation ¶
Overview ¶
Copyright 2018 The JIMDB Authors.
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
- func New() monitoring.Monitor
- func Range(f func(string, Metric) bool)
- func Register(m Metric)
- type Collector
- type Counter
- type CounterVec
- type Gauge
- type GaugeVec
- type Label
- type MKey
- type Meta
- type Metric
- type MetricMap
- type Monitor
- func (m *Monitor) GetCluster() string
- func (m *Monitor) GetCounter(nameSpace, subSystem, name string, lvs ...string) monitoring.Counter
- func (m *Monitor) GetGauge(nameSpace, subSystem, name string, lvs ...string) monitoring.Gauge
- func (m *Monitor) GetInstance() string
- func (m *Monitor) GetPushGatewayUrl() string
- func (m *Monitor) Init(cluster, instance string, pushGateway string, pushInterval time.Duration)
- func (m *Monitor) Push()
- func (m *Monitor) RegisterCounter(nameSpace, subSystem, name string, labelNames []string)
- func (m *Monitor) RegisterGauge(nameSpace, subSystem, name string, labelNames []string)
- func (m *Monitor) Start()
- func (m *Monitor) Stop()
- type Pusher
Constants ¶
View Source
const Instance = "instance"
View Source
const Name = "baudtime"
Variables ¶
This section is empty.
Functions ¶
func New ¶
func New() monitoring.Monitor
Types ¶
type CounterVec ¶
type CounterVec struct {
Collector
}
func NewCounterVec ¶
func NewCounterVec(metadata Meta) *CounterVec
func (*CounterVec) Name ¶
func (cv *CounterVec) Name() string
func (*CounterVec) ToMetric ¶
func (cv *CounterVec) ToMetric() []*msg.Series
func (*CounterVec) WithLabelValues ¶
func (cv *CounterVec) WithLabelValues(lvs ...string) *Counter
type GaugeVec ¶
type GaugeVec struct {
Collector
}
func NewGaugeVec ¶
func (*GaugeVec) WithLabelValues ¶
type Meta ¶
type Meta struct { NameSpace string SubSystem string Name string InnerLabels []Label Labels []Label }
func NewMetaWithLabels ¶
func (*Meta) MetricLabels ¶
func (*Meta) MetricName ¶
type MetricMap ¶
type MetricMap struct { Meta // contains filtered or unexported fields }
func (*MetricMap) CreateMetricIfMissing ¶
func (*MetricMap) ValidLabels ¶
type Monitor ¶
type Monitor struct {
// contains filtered or unexported fields
}
func (*Monitor) GetCluster ¶
func (*Monitor) GetCounter ¶
func (m *Monitor) GetCounter(nameSpace, subSystem, name string, lvs ...string) monitoring.Counter
func (*Monitor) GetGauge ¶
func (m *Monitor) GetGauge(nameSpace, subSystem, name string, lvs ...string) monitoring.Gauge
func (*Monitor) GetInstance ¶
func (*Monitor) GetPushGatewayUrl ¶
func (*Monitor) RegisterCounter ¶
register must call before Start()
func (*Monitor) RegisterGauge ¶
Click to show internal directories.
Click to hide internal directories.