blob: b249193de1a9809fb406b802cfcc45e5089f5a5c [file] [log] [blame]
// Copyright 2018 The Fuchsia Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
library fuchsia.overnet;
using fuchsia.overnet.protocol;
[Discoverable]
interface Overnet {
1: ListPeers() -> (vector<Peer> peers);
// TODO(ctiller): remove this, and move to something that looks way more like an explicit registry.
2: RegisterService(string service_name, ServiceProvider provider);
3: ConnectToService(fuchsia.overnet.protocol.NodeId node,
string service_name, handle<channel> chan);
};
interface ServiceProvider {
1: ConnectToService(string service_name, handle<channel> chan);
};
struct Peer {
fuchsia.overnet.protocol.NodeId id;
bool is_self;
fuchsia.overnet.protocol.PeerDescription description;
};