# Path: rep0st/framework/web.py
# class MountPoint(NamedTuple):
#   mount_path: str
#   app: Callable
# 
# class WebApp(ABC):
# 
#   def get_mounts(self) -> List[MountPoint]:
#     return []
# 
#   def get_rules(self) -> List[Rule]:
#     return []
# 
# class WebServerModule(Module):
# 
#   def configure(self, binder: Binder):
#     binder.bind(_WebserverBindHostnameKey, to=FLAGS.webserver_bind_hostname)
#     binder.bind(_WebserverBindPortKey, to=FLAGS.webserver_bind_port)
#     binder.bind(EndpointProcessor)
#     binder.bind(WebServer)
# 
#   @multiprovider
#   def provide_decorator_processor(
#       self, endpoint_processor: EndpointProcessor) -> List[DecoratorProcessor]:
#     return [endpoint_processor]
# 
#   @multiprovider
#   def provide_default_webapp_list(self) -> List[WebApp]:
#     # Provide default empty list of web applications to make injector happy.
#     return []


from typing import List
from injector import Binder, Module, multiprovider, singleton
from prometheus_client import make_wsgi_app
from rep0st.framework.web import MountPoint, WebApp, WebServerModule




@singleton
class MetriczPage(WebApp):

  def get_mounts(self) -> List[MountPoint]:
    return [MountPoint('/metricz', make_wsgi_app())]


class MetriczPageModule(Module):

  def configure(self, binder: Binder) -> None:
    binder.install(WebServerModule)
    binder.bind(MetriczPage)

  @multiprovider

# Path: rep0st/framework/web.py
# class MountPoint(NamedTuple):
#   mount_path: str
#   app: Callable
# 
# class WebApp(ABC):
# 
#   def get_mounts(self) -> List[MountPoint]:
#     return []
# 
#   def get_rules(self) -> List[Rule]:
#     return []
# 
# class WebServerModule(Module):
# 
#   def configure(self, binder: Binder):
#     binder.bind(_WebserverBindHostnameKey, to=FLAGS.webserver_bind_hostname)
#     binder.bind(_WebserverBindPortKey, to=FLAGS.webserver_bind_port)
#     binder.bind(EndpointProcessor)
#     binder.bind(WebServer)
# 
#   @multiprovider
#   def provide_decorator_processor(
#       self, endpoint_processor: EndpointProcessor) -> List[DecoratorProcessor]:
#     return [endpoint_processor]
# 
#   @multiprovider
#   def provide_default_webapp_list(self) -> List[WebApp]:
#     # Provide default empty list of web applications to make injector happy.
#     return []


# Path: rep0st/framework/status_page/metricz.py
from typing import List
from injector import Binder, Module, multiprovider, singleton
from prometheus_client import make_wsgi_app
from rep0st.framework.web import MountPoint, WebApp, WebServerModule





@singleton
class MetriczPage(WebApp):

  def get_mounts(self) -> List[MountPoint]:
    return [MountPoint('/metricz', make_wsgi_app())]


class MetriczPageModule(Module):

  def configure(self, binder: Binder) -> None:
    binder.install(WebServerModule)
    binder.bind(MetriczPage)

  @multiprovider

  def provide_metricz_page(self, metricz_page: MetriczPage) -> List[WebApp]: