All Downloads are FREE. Search and download functionalities are using the official Maven repository.

zio.metrics.connectors.prometheus.PrometheusPublisher.scala Maven / Gradle / Ivy

There is a newer version: 2.3.1
Show newest version
package zio.metrics.connectors.prometheus

import zio._

class PrometheusPublisher private (
  current: Ref[String]) {

  def get(implicit trace: Trace): UIO[String] =
    current.get

  def set(next: String)(implicit trace: Trace): UIO[Unit] =
    current.set(next)
}

object PrometheusPublisher {

  def make = for {
    current <- Ref.make[String]("")
  } yield new PrometheusPublisher(current)

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy