You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
package metric
|
|
|
|
import "github.com/zeromicro/go-zero/core/prometheus"
|
|
|
|
// A VectorOpts is a general configuration.
|
|
type VectorOpts struct {
|
|
Namespace string
|
|
Subsystem string
|
|
Name string
|
|
Help string
|
|
Labels []string
|
|
}
|
|
|
|
func update(fn func()) {
|
|
if !prometheus.Enabled() {
|
|
return
|
|
}
|
|
|
|
fn()
|
|
}
|