Documentation ¶
Index ¶
- Constants
- func DecQueuedRanges()
- func HTTPMiddleware(next http.Handler) http.Handler
- func IPCMiddleware(server *rpc.Server, client rpc.Conn)
- func IncQueuedRanges()
- func Init()
- func Listen(addr string) *http.Server
- func RegisterDBCollector(name string, db *sqlx.DB)
- func SetLastLoadedHeight(height int64)
- func SetLastProcessedHeight(height int64)
- func SetTimeMetric(name string, t time.Duration)
- type DBStatsCollector
- type DBStatsGetter
Constants ¶
const ( RANGES_QUEUED = "ranges_queued" LOADED_HEIGHT = "loaded_height" PROCESSED_HEIGHT = "processed_height" T_BLOCK_LOAD = "t_block_load" T_BLOCK_PROCESSING = "t_block_processing" T_STATE_PROCESSING = "t_state_processing" T_POSTGRES_TX_COMMIT = "t_postgres_tx_commit" )
Variables ¶
This section is empty.
Functions ¶
func DecQueuedRanges ¶ added in v0.2.6
func DecQueuedRanges()
DecQueuedRanges decrements the number of queued range requests
func HTTPMiddleware ¶ added in v0.2.6
HTTPMiddleware http connection metric reader
func IPCMiddleware ¶ added in v0.2.6
IPCMiddleware unix-socket connection counter
func IncQueuedRanges ¶ added in v0.2.6
func IncQueuedRanges()
IncQueuedRanges increments the number of queued range requests
func RegisterDBCollector ¶
RegisterDBCollector create metric collector for given connection
func SetLastLoadedHeight ¶
func SetLastLoadedHeight(height int64)
SetLastLoadedHeight sets last loaded height
func SetLastProcessedHeight ¶
func SetLastProcessedHeight(height int64)
SetLastProcessedHeight sets last processed height
func SetTimeMetric ¶
SetTimeMetric time metric observation
Types ¶
type DBStatsCollector ¶
type DBStatsCollector struct {
// contains filtered or unexported fields
}
DBStatsCollector implements the prometheus.Collector interface.
func NewDBStatsCollector ¶
func NewDBStatsCollector(dbName string, sg DBStatsGetter) *DBStatsCollector
NewDBStatsCollector creates a new DBStatsCollector.
func (DBStatsCollector) Collect ¶
func (c DBStatsCollector) Collect(ch chan<- prometheus.Metric)
Collect implements the prometheus.Collector interface.
func (DBStatsCollector) Describe ¶
func (c DBStatsCollector) Describe(ch chan<- *prometheus.Desc)
Describe implements the prometheus.Collector interface.
type DBStatsGetter ¶
DBStatsGetter is an interface that gets sql.DBStats.