forked from uber-archive/hyperbahn
-
Notifications
You must be signed in to change notification settings - Fork 0
/
hyperbahn.thrift
42 lines (35 loc) · 836 Bytes
/
hyperbahn.thrift
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
exception NoPeersAvailable {
1: required string message
2: required string serviceName
}
exception InvalidServiceName {
1: required string message
2: required string serviceName
}
struct DiscoveryQuery {
1: required string serviceName
}
union IpAddress {
1: i32 ipv4
}
struct ServicePeer {
1: required IpAddress ip
2: required i32 port
}
struct DiscoveryResult {
1: required list<ServicePeer> peers
}
service Hyperbahn {
DiscoveryResult discover(
1: required DiscoveryQuery query
) throws (
1: NoPeersAvailable noPeersAvailable
2: InvalidServiceName invalidServiceName
)
DiscoveryResult discoverAffine(
1: required DiscoveryQuery query
) throws (
1: NoPeersAvailable noPeersAvailable
2: InvalidServiceName invalidServiceName
)
}