mirror of
https://github.com/ScuroNeko/mtg.git
synced 2026-08-31 21:54:01 +03:00
Update docs
This commit is contained in:
+1
-1
@@ -1,4 +1,4 @@
|
||||
// Stats package has implementations of events.Observers for different
|
||||
// Stats package has implementations of [events.Observer] for different
|
||||
// monitoring systems.
|
||||
//
|
||||
// Observer is a consumer of events produced by mtg. Consumers, defined
|
||||
|
||||
+3
-4
@@ -139,12 +139,11 @@ func (p prometheusProcessor) Shutdown() {
|
||||
}
|
||||
}
|
||||
|
||||
// PrometheusFactory is a factory of events.Observers which collect
|
||||
// PrometheusFactory is a factory of [events.Observer] which collect
|
||||
// information in a format suitable for Prometheus.
|
||||
//
|
||||
// This factory can also serve on a given listener. In that case it
|
||||
// starts HTTP server with a single endpoint - a Prometheus-compatible
|
||||
// scrape output.
|
||||
// This factory can also serve on a given listener. In that case it starts HTTP
|
||||
// server with a single endpoint - a Prometheus-compatible scrape output.
|
||||
type PrometheusFactory struct {
|
||||
httpServer *http.Server
|
||||
|
||||
|
||||
+7
-8
@@ -147,13 +147,13 @@ func (s statsdProcessor) Shutdown() {
|
||||
}
|
||||
}
|
||||
|
||||
// StatsdFactory is a factory of events.Observers which dumps
|
||||
// information to statsd.
|
||||
// StatsdFactory is a factory of [events.Observer] which dumps information to
|
||||
// statsd.
|
||||
//
|
||||
// Please beware that we support ONLY UDP endpoints there. And this
|
||||
// factory won't use mtglib.Network so it won't use a proxy if you
|
||||
// provide any. If you need it, I would recommend starting a local
|
||||
// statsd and route metrics further by features of the chosen server.
|
||||
// Please beware that we support ONLY UDP endpoints there. And this factory
|
||||
// won't use [mtglib.Network] so it won't use a proxy if you provide any. If
|
||||
// you need it, I would recommend starting a local statsd and route metrics
|
||||
// further by features of the chosen server.
|
||||
type StatsdFactory struct {
|
||||
client *statsd.Client
|
||||
}
|
||||
@@ -171,8 +171,7 @@ func (s StatsdFactory) Make() events.Observer {
|
||||
}
|
||||
}
|
||||
|
||||
// NewStatsd builds an events.ObserverFactory that sends events
|
||||
// to statsd.
|
||||
// NewStatsd builds an [events.ObserverFactory] that sends events to statsd.
|
||||
//
|
||||
// Valid tagFormats are 'datadog', 'influxdb' and 'graphite'.
|
||||
func NewStatsd(address string, log logger.StdLikeLogger,
|
||||
|
||||
Reference in New Issue
Block a user