Documentation ¶
Index ¶
Constants ¶
const (
XNameSpace = xNameSpace
)
const
Variables ¶
This section is empty.
Functions ¶
func CombineMonitorsRes ¶
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 ¶
PortMetrics monitors connecting number
func GetPortMetrics ¶
func GetPortMetrics() *PortMetrics
GetPortMetrics returns Metrics build using Prometheus client library if Prometheus is enabled Otherwise, it returns no-op Metrics
func NewPortMetrics ¶
func NewPortMetrics(labelsAndValues ...string) *PortMetrics
NewPortMetrics returns a pointer of a new PortMetrics object
func NopPortMetrics ¶
func NopPortMetrics() *PortMetrics
NopPortMetrics returns a pointer of a no-op Metrics
func (*PortMetrics) SetConnectingNums ¶
func (portMetrics *PortMetrics) SetConnectingNums(connectingMap map[uint64]int)
SetConnectingNums sets connectingNums by connecting number of each port
type PortMonitor ¶
type PortMonitor struct {
// contains filtered or unexported fields
}
PortMonitor - structure of monitor for ports
func GetPortMonitor ¶
func GetPortMonitor() *PortMonitor
GetPortMonitor gets the global instance of PortMonitor
func NewPortMonitor ¶
func NewPortMonitor(ports []string) *PortMonitor
NewPortMonitor creates a new instance of PortMonitor
func (*PortMonitor) GetConnectingMap ¶
func (pm *PortMonitor) GetConnectingMap() map[uint64]int
GetConnectingMap gets connectingMap
func (*PortMonitor) GetResultString ¶
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 ¶
type TendermintMonitor struct {
// contains filtered or unexported fields
}
TendermintMonitor - structure of monitor for block/mempool monitoring
func GetTendermintMonitor ¶
func GetTendermintMonitor() *TendermintMonitor
GetTendermintMonitor gets the global instance of TendermintMonitor
func NewTendermintMonitor ¶
func NewTendermintMonitor(portInput string) *TendermintMonitor
NewTendermintMonitor creates a new instance of TendermintMonitor
func (*TendermintMonitor) GetResultString ¶
func (tm *TendermintMonitor) GetResultString() string
GetResultString gets the format string result
func (*TendermintMonitor) Run ¶
func (tm *TendermintMonitor) Run(height int64) error
Run starts monitoring