mirror of
https://github.com/nspcc-dev/neo-go.git
synced 2024-12-12 11:10:35 +00:00
ebb71497a5
Close #3682 Signed-off-by: Ekaterina Pavlova <ekt@morphbits.io>
23 lines
396 B
Go
23 lines
396 B
Go
package server
|
|
|
|
import (
|
|
"github.com/prometheus/client_golang/prometheus"
|
|
)
|
|
|
|
var neogoVersion = prometheus.NewGaugeVec(
|
|
prometheus.GaugeOpts{
|
|
Help: "NeoGo version",
|
|
Name: "version",
|
|
Namespace: "neogo",
|
|
},
|
|
[]string{"version"})
|
|
|
|
func setNeoGoVersion(nodeVer string) {
|
|
neogoVersion.WithLabelValues(nodeVer).Add(1)
|
|
}
|
|
|
|
func init() {
|
|
prometheus.MustRegister(
|
|
neogoVersion,
|
|
)
|
|
}
|