diff options
author | Wolfy-J <[email protected]> | 2019-06-25 17:38:29 +0300 |
---|---|---|
committer | Wolfy-J <[email protected]> | 2019-06-25 17:38:29 +0300 |
commit | c8459e1e5933f8bf5bc25635ce13724d492e5ebe (patch) | |
tree | 56c5807d9e3b426835b4e6dea21ee976e3c13050 /service/metrics/config.go | |
parent | e19c5d46dcb866c8f0d91779c95a2340a217ee55 (diff) |
prometheus
Diffstat (limited to 'service/metrics/config.go')
-rw-r--r-- | service/metrics/config.go | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/service/metrics/config.go b/service/metrics/config.go new file mode 100644 index 00000000..799ba2d2 --- /dev/null +++ b/service/metrics/config.go @@ -0,0 +1,23 @@ +package metrics + +import "github.com/spiral/roadrunner/service" + +type Config struct { + // Address to listen + Address string + + // Metrics define application specific metrics. + Metrics map[string]Metric +} + +// Metric describes single application specific metric. +type Metric struct { + Type string + Description string + Labels []string +} + +// Hydrate configuration. +func (c *Config) Hydrate(cfg service.Config) error { + return cfg.Unmarshal(c) +} |