-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
7 changed files
with
80 additions
and
74 deletions.
There are no files selected for viewing
14 changes: 14 additions & 0 deletions
14
client/src/main/scala/org/lyranthe/prometheus/client/Registry.scala
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
package org.lyranthe.prometheus.client | ||
|
||
import org.lyranthe.prometheus.client.registry._ | ||
|
||
trait Registry { | ||
def unsafeRegister(c: MetricFamily): Unit | ||
def collect(): Iterator[RegistryMetrics] | ||
|
||
def output(format: RegistryFormat): Iterator[Array[Byte]] = | ||
format.output(collect) | ||
|
||
def outputText: String = | ||
TextFormat.output(collect).map(new String(_)).mkString | ||
} |
9 changes: 0 additions & 9 deletions
9
client/src/main/scala/org/lyranthe/prometheus/client/registry/Registry.scala
This file was deleted.
Oops, something went wrong.
8 changes: 2 additions & 6 deletions
8
client/src/main/scala/org/lyranthe/prometheus/client/registry/RegistryFormat.scala
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,6 @@ | ||
package org.lyranthe.prometheus.client.registry | ||
|
||
trait RegistryFormat { | ||
type Out | ||
def output(values: => Iterator[RegistryMetrics]): Iterator[Out] | ||
} | ||
|
||
object RegistryFormat { | ||
type Aux[Out0] = RegistryFormat { type Out = Out0 } | ||
def contentType: String | ||
def output(values: => Iterator[RegistryMetrics]): Iterator[Array[Byte]] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters