Documentation
¶
Index ¶
- func StartMetricsServer(ctx context.Context, addr string, exporter *MetricsExporter) error
- type MetricsExporter
- func (m *MetricsExporter) GetMetrics() map[string]interface{}
- func (m *MetricsExporter) RecordRequest(success bool, responseTime float64)
- func (m *MetricsExporter) ServeHTTP(w http.ResponseWriter, r *http.Request)
- func (m *MetricsExporter) SetConcurrentAttacks(count int64)
- func (m *MetricsExporter) SetQueueDepth(depth int64)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func StartMetricsServer ¶
func StartMetricsServer(ctx context.Context, addr string, exporter *MetricsExporter) error
Types ¶
type MetricsExporter ¶
type MetricsExporter struct {
// contains filtered or unexported fields
}
MetricsExporter exports metrics for Prometheus
func NewMetricsExporter ¶
func NewMetricsExporter() *MetricsExporter
NewMetricsExporter creates a new metrics exporter
func (*MetricsExporter) GetMetrics ¶
func (m *MetricsExporter) GetMetrics() map[string]interface{}
func (*MetricsExporter) RecordRequest ¶
func (m *MetricsExporter) RecordRequest(success bool, responseTime float64)
func (*MetricsExporter) ServeHTTP ¶
func (m *MetricsExporter) ServeHTTP(w http.ResponseWriter, r *http.Request)
func (*MetricsExporter) SetConcurrentAttacks ¶
func (m *MetricsExporter) SetConcurrentAttacks(count int64)
func (*MetricsExporter) SetQueueDepth ¶
func (m *MetricsExporter) SetQueueDepth(depth int64)
Click to show internal directories.
Click to hide internal directories.