Documentation ¶
Index ¶
- Variables
- func HeadlCheckHandler(w http.ResponseWriter, r *http.Request)
- func IncQps()
- func LogVersion(params map[string]string)
- func NewVersionCollector(appName string) prometheus.Collector
- func ReadBuildInfo()
- func ReadBuildInfoNoExit()
- func VersionHandler(w http.ResponseWriter, r *http.Request)
- type CpuMetric
- type NetMetric
- type QpsMetric
Constants ¶
This section is empty.
Variables ¶
View Source
var ( Version = "None" GitHash = "NoneHash" GitBranch = "NoneBranch" COYPRIGHT = "©2018-%d %s" Owner = "jialinwu" BuildTime = "None" BuildUser = "None" BuildHost = "None" GoVersion = runtime.Version() )
View Source
var CurProc *process.Process
Functions ¶
func HeadlCheckHandler ¶ added in v1.0.3
func HeadlCheckHandler(w http.ResponseWriter, r *http.Request)
func LogVersion ¶ added in v1.0.4
LogVersion assigns version info to params
func NewVersionCollector ¶
func NewVersionCollector(appName string) prometheus.Collector
NewVersionCollector returns a collector that exports metrics about current version information.
func ReadBuildInfo ¶
func ReadBuildInfo()
func ReadBuildInfoNoExit ¶
func ReadBuildInfoNoExit()
func VersionHandler ¶ added in v1.0.2
func VersionHandler(w http.ResponseWriter, r *http.Request)
Types ¶
type CpuMetric ¶
type CpuMetric struct {
// contains filtered or unexported fields
}
func NewCpuMetric ¶
func (*CpuMetric) Collect ¶
func (m *CpuMetric) Collect(ch chan<- prometheus.Metric)
func (*CpuMetric) Describe ¶
func (m *CpuMetric) Describe(ch chan<- *prometheus.Desc)
type NetMetric ¶
type NetMetric struct {
// contains filtered or unexported fields
}
func NewNetMetric ¶
func (*NetMetric) Collect ¶
func (m *NetMetric) Collect(ch chan<- prometheus.Metric)
func (*NetMetric) Describe ¶
func (m *NetMetric) Describe(ch chan<- *prometheus.Desc)
type QpsMetric ¶
type QpsMetric struct {
// contains filtered or unexported fields
}
func NewQpsMetric ¶
func (*QpsMetric) Collect ¶
func (m *QpsMetric) Collect(ch chan<- prometheus.Metric)
func (*QpsMetric) Describe ¶
func (m *QpsMetric) Describe(ch chan<- *prometheus.Desc)
Click to show internal directories.
Click to hide internal directories.