1 Star 1 Fork 0

kade / library

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
interface.go 594 Bytes
一键复制 编辑 原始数据 按行查看 历史
kade 提交于 2024-03-21 23:09 . 补充ioc server run
package metric
const (
AppName = "metric"
)
type METRIC_PROVIDER string
const (
METRIC_PROVIDER_PROMETHEUS METRIC_PROVIDER = "prometheus"
)
type Metric struct {
Enable bool `json:"enable" yaml:"enable" toml:"enable" env:"METRIC_ENABLE"`
Provider METRIC_PROVIDER `toml:"provider" json:"provider" yaml:"provider" env:"METRIC_PROVIDER"`
Endpoint string `toml:"endpoint" json:"endpoint" yaml:"endpoint" env:"METRIC_ENDPOINT"`
}
func NewDefaultMetric() *Metric {
return &Metric{
Enable: true,
Provider: METRIC_PROVIDER_PROMETHEUS,
Endpoint: "/metrics",
}
}
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
Go
1
https://gitee.com/go-kade/library.git
git@gitee.com:go-kade/library.git
go-kade
library
library
v1.2.1

搜索帮助

344bd9b3 5694891 D2dac590 5694891