Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CombineMonitorsRes ¶ added in v0.16.8
CombineMonitorsRes combines all the monitors' results
func DefaultPrometheusConfig ¶
func DefaultPrometheusConfig() *prometheusConfig
DefaultPrometheusConfig returns a default PrometheusConfig pointer
Types ¶
type OrderMetric ¶
type OrderMetric struct { FullFilledNum metrics.Gauge PendingNum metrics.Gauge CanceledNum metrics.Gauge ExpiredNum metrics.Gauge PartialFilledNum metrics.Gauge }
OrderMetric is the struct of metric in order module
func DefaultOrderMetrics ¶
func DefaultOrderMetrics(config *prometheusConfig) *OrderMetric
DefaultOrderMetrics returns Metrics build using Prometheus client library if Prometheus is enabled Otherwise, it returns no-op Metrics
func NewOrderMetrics ¶
func NewOrderMetrics(labelsAndValues ...string) *OrderMetric
NewOrderMetrics returns a pointer of a new OrderMetric object
func NopOrderMetrics ¶
func NopOrderMetrics() *OrderMetric
NopOrderMetrics returns a pointer of a no-op Metrics
type PortMetrics ¶ added in v0.16.8
PortMetrics monitors connecting number
func GetPortMetrics ¶ added in v0.16.8
func GetPortMetrics() *PortMetrics
GetPortMetrics returns Metrics build using Prometheus client library if Prometheus is enabled Otherwise, it returns no-op Metrics
func NewPortMetrics ¶ added in v0.16.8
func NewPortMetrics(labelsAndValues ...string) *PortMetrics
NewPortMetrics returns a pointer of a new PortMetrics object
func NopPortMetrics ¶ added in v0.16.8
func NopPortMetrics() *PortMetrics
NopPortMetrics returns a pointer of a no-op Metrics
func (*PortMetrics) SetConnectingNums ¶ added in v0.16.8
func (portMetrics *PortMetrics) SetConnectingNums(connectingMap map[uint64]int)
SetConnectingNums sets connectingNums by connecting number of each port
type PortMonitor ¶ added in v0.16.8
type PortMonitor struct {
// contains filtered or unexported fields
}
PortMonitor - structure of monitor for ports
func GetPortMonitor ¶ added in v0.16.8
func GetPortMonitor() *PortMonitor
GetPortMonitor gets the global instance of PortMonitor
func NewPortMonitor ¶ added in v0.16.8
func NewPortMonitor(ports []string) *PortMonitor
NewPortMonitor creates a new instance of PortMonitor
func (*PortMonitor) GetConnectingMap ¶ added in v0.16.8
func (pm *PortMonitor) GetConnectingMap() map[uint64]int
GetConnectingMap gets connectingMap
func (*PortMonitor) GetResultString ¶ added in v0.16.8
func (pm *PortMonitor) GetResultString() string
GetResultString gets the format string result
type StreamMetrics ¶
StreamMetrics is the struct of metric in stream module
func DefaultStreamMetrics ¶
func DefaultStreamMetrics(config *prometheusConfig) *StreamMetrics
DefaultStreamMetrics returns Metrics build using Prometheus client library if Prometheus is enabled Otherwise, it returns no-op Metrics
func NewStreamMetrics ¶
func NewStreamMetrics(labelsAndValues ...string) *StreamMetrics
NewStreamMetrics returns a pointer of a new StreamMetrics object
func NopStreamMetrics ¶
func NopStreamMetrics() *StreamMetrics
NopStreamMetrics returns a pointer of no-op Metrics
type TendermintMonitor ¶ added in v0.16.8
type TendermintMonitor struct {
// contains filtered or unexported fields
}
TendermintMonitor - structure of monitor for block/mempool monitoring
func GetTendermintMonitor ¶ added in v0.16.8
func GetTendermintMonitor() *TendermintMonitor
GetTendermintMonitor gets the global instance of TendermintMonitor
func NewTendermintMonitor ¶ added in v0.16.8
func NewTendermintMonitor(portInput string) *TendermintMonitor
NewTendermintMonitor creates a new instance of TendermintMonitor
func (*TendermintMonitor) GetResultString ¶ added in v0.16.8
func (tm *TendermintMonitor) GetResultString() string
GetResultString gets the format string result
func (*TendermintMonitor) Run ¶ added in v0.16.8
func (tm *TendermintMonitor) Run(height int64) error
Run starts monitoring