title: How can I tell which gRPC server I am talking to?
body: <p>Preface: There is a project called <a href="https://github.com/lightningnetwork/lnd" rel="nofollow noreferrer">LND</a> that uses two gRPC servers. One starts listening on boot with a WalletUnlocker service. The methods are related to unlocking the LND node for use. Then once unlocked, the LND process kills the gRPC server, and on the exact same ports creates a new server with the Lightning service. (Completely different methods)</p>
  
  <p>I want to programmatically ping the LND node's gRPC and ask it "What services are you currently serving, so I can find out if I need to unlock you and wait, or if I can go about my business with your Lightning service."</p>
  
  <p>Loading package definitions and creating credentials all depend on which service I'm trying to connect to, as the two servers are configured differently, but on the same port... so I assume whatever method I come up with will not rely on the package definitions or macaroon credentials at all. Please tell me if I am wrong.</p>
  
  <p>Thank you.</p>