Documentation ¶
Index ¶
Constants ¶
View Source
const (
DefaultAddress = ":9090"
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type MetricWriter ¶
type MetricWriter struct {
// contains filtered or unexported fields
}
func (*MetricWriter) Collect ¶
func (m *MetricWriter) Collect(ch chan<- prometheus.Metric)
func (*MetricWriter) Describe ¶
func (m *MetricWriter) Describe(ch chan<- *prometheus.Desc)
type MetricWriterOpts ¶
type MetricWriterOpts func(*MetricWriter)
func WithNamespace ¶
func WithNamespace(namespace string) MetricWriterOpts
type SeverOpt ¶
type SeverOpt func(*Server)
func WithAddress ¶
func WithCollectors ¶
func WithCollectors(collectors ...prometheus.Collector) SeverOpt
func WithHandlerOpts ¶
func WithHandlerOpts(opts promhttp.HandlerOpts) SeverOpt
func WithRegistry ¶
func WithRegistry(registry *prometheus.Registry) SeverOpt
type Writer ¶
type Writer interface { PutMetric(metric string, class Class, value float64) Collect(ch chan<- prometheus.Metric) Describe(ch chan<- *prometheus.Desc) }
func NewMetricWriter ¶
func NewMetricWriter(opts ...MetricWriterOpts) Writer
Click to show internal directories.
Click to hide internal directories.