custommetrics
custommetrics
import "github.com/cloudfoundry/go-cf-api/internal/metrics/custommetrics"
Index
Constants
const namespace = "go_custom_stats"
type CustomCollector
type CustomCollector struct {
cpuUsage *prometheus.Desc
uptime *prometheus.Desc
startTime time.Time
}
func NewCustomCollector
func NewCustomCollector(startTime time.Time) *CustomCollector
func (*CustomCollector) Collect
func (e *CustomCollector) Collect(channel chan<- prometheus.Metric)
func (*CustomCollector) Describe
func (e *CustomCollector) Describe(ch chan<- *prometheus.Desc)
func (*CustomCollector) cpuStatus
func (e *CustomCollector) cpuStatus() (float64, error)
func (*CustomCollector) upTime
func (e *CustomCollector) upTime() float64
Generated by gomarkdoc