[Yellowstone] Move registration service to the main yellowstone service

This commit is contained in:
Drew Galbraith 2023-10-24 23:42:34 -07:00
parent b516087922
commit 05e12aaa7d
13 changed files with 143 additions and 156 deletions

View file

@ -29,16 +29,13 @@ uint64_t main(uint64_t init_port_cap) {
ASSIGN_OR_RETURN(glcr::UniquePtr<EndpointClient> client,
server->CreateClient());
RegisterInfo reg;
Empty empty2;
check(stub.GetRegister(empty2, reg));
PortClient register_port = PortClient::AdoptPort(reg.register_port());
check(register_port.WriteString("denali", client->GetCap()));
Thread server_thread = server->RunServer();
RegisterEndpointRequest req;
req.set_endpoint_name("denali");
req.set_endpoint_capability(client->GetCap());
check(stub.RegisterEndpoint(req, empty));
check(server_thread.Join());
return 0;
}