Hi, I would like to just obtain the information of the server I connected to here is how my functionality is being used:
ProjectGuideClient client(grpc::CreateChannel(server,grpc::InsecureChannelCredentials()));
client.Dele(args);
If I return back a not ok status I would like to connect to a master node and retrieve the back up server to connect to. To do this I need to send the server that I want the back up to. In this case I need to obtain the variable "server" as shown in above. where can I access this information? and how. below there are questions marks of how I would to use it and I thought I could get the information? Thanks!!
/*
Dele rpc command
Parms string row, string col
Returns true if deleted, false if an error
*/
bool ProjectGuideClient::Dele(DeleArgs args) {
DeleResponse response;
ClientContext context;
Status status = stub_->Dele(&context, args, &response);
if(status.ok())
return status.ok();
else{
//get my channel to senda rewuest for backup
my channel = "Channel.Target(); ???????
}
}