[serve] Rename to Controller (#9566)

This commit is contained in:
Ian Rodney
2020-07-20 12:50:29 -07:00
committed by GitHub
parent 3d0a3c47a8
commit b8fc259796
16 changed files with 108 additions and 106 deletions
+5 -5
View File
@@ -26,14 +26,14 @@ class HTTPProxy:
# blocks forever
"""
async def fetch_config_from_master(self, instance_name=None):
async def fetch_config_from_controller(self, instance_name=None):
assert ray.is_initialized()
master = serve.api._get_master_actor()
controller = serve.api._get_controller()
self.route_table = await master.get_http_proxy_config.remote()
self.route_table = await controller.get_http_proxy_config.remote()
# The exporter is required to return results for /-/metrics endpoint.
[self.metric_exporter] = await master.get_metric_exporter.remote()
[self.metric_exporter] = await controller.get_metric_exporter.remote()
self.metric_client = MetricClient(self.metric_exporter)
self.request_counter = self.metric_client.new_counter(
@@ -172,7 +172,7 @@ class HTTPProxyActor:
async def __init__(self, host, port, instance_name=None):
serve.init(name=instance_name)
self.app = HTTPProxy()
await self.app.fetch_config_from_master(instance_name)
await self.app.fetch_config_from_controller(instance_name)
self.host = host
self.port = port