mirror of
https://github.com/trezor/blockbook.git
synced 2026-02-20 00:51:39 +01:00
Fix coding style and formatting issues
This commit is contained in:
@@ -6,6 +6,7 @@ import (
|
||||
"github.com/prometheus/client_golang/prometheus"
|
||||
)
|
||||
|
||||
// Metrics holds prometheus collectors for various metrics collected by Blockbook
|
||||
type Metrics struct {
|
||||
SocketIORequests *prometheus.CounterVec
|
||||
SocketIOSubscribes *prometheus.CounterVec
|
||||
@@ -28,8 +29,10 @@ type Metrics struct {
|
||||
BlockbookAppInfo *prometheus.GaugeVec
|
||||
}
|
||||
|
||||
// Labels represents a collection of label name -> value mappings.
|
||||
type Labels = prometheus.Labels
|
||||
|
||||
// GetMetrics returns struct holding prometheus collectors for various metrics collected by Blockbook
|
||||
func GetMetrics(coin string) (*Metrics, error) {
|
||||
metrics := Metrics{}
|
||||
|
||||
|
||||
@@ -8,6 +8,7 @@ var (
|
||||
buildtime = "unknown"
|
||||
)
|
||||
|
||||
// VersionInfo holds information about the running Blockbook instance
|
||||
type VersionInfo struct {
|
||||
Version string `json:"version"`
|
||||
GitCommit string `json:"gitcommit"`
|
||||
@@ -16,6 +17,7 @@ type VersionInfo struct {
|
||||
OSArch string `json:"os/arch"`
|
||||
}
|
||||
|
||||
// GetVersionInfo returns VersionInfo of the running Blockbook instance
|
||||
func GetVersionInfo() VersionInfo {
|
||||
return VersionInfo{
|
||||
Version: version,
|
||||
|
||||
Reference in New Issue
Block a user