| module discovery; |
| |
| interface Discovery { |
| // TODO(bjornick): Figure out how to do security in mojo |
| Advertise(Service service) => (DiscoveryStopper Handle); |
| |
| Scan(string query, DiscoveryHandler handler) => (DiscoveryStopper Handle); |
| }; |
| |
| interface DiscoveryStopper { |
| // Stops the Advertisement/Scanning that is associated with this service |
| Stop(); |
| }; |
| |
| interface DiscoveryHandler { |
| Found(Service s); |
| |
| Lost(array<uint8> id); |
| }; |
| |
| struct Service { |
| // The interface name this service implements. |
| // E.g. 'v.io/v23/Display.T |
| string InterfaceNames; |
| |
| map<string, string> Attrs; |
| |
| array<string> Addrs; |
| }; |