/
dht.aqua
80 lines (69 loc) · 2.27 KB
/
dht.aqua
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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
data ClearExpiredResult:
success: bool
error: string
count_keys: u64
count_values: u64
data DhtResult:
success: bool
error: string
data Key:
key: string
peer_id: string
timestamp_created: u64
pinned: bool
weight: u32
data Record:
value: string
peer_id: string
set_by: string
relay_id: []string
service_id: []string
timestamp_created: u64
weight: u32
data EvictStaleItem:
key: Key
records: []Record
data EvictStaleResult:
success: bool
error: string
results: []EvictStaleItem
data GetKeyMetadataResult:
success: bool
error: string
key: Key
data GetValuesResult:
success: bool
error: string
result: []Record
data MergeResult:
success: bool
error: string
result: []Record
data PutHostValueResult:
success: bool
error: string
key: string
value: []Record
data RepublishValuesResult:
success: bool
error: string
updated: u64
service AquaDHT("aqua-dht"):
clear_expired(current_timestamp_sec: u64) -> ClearExpiredResult
clear_host_value(key: string, current_timestamp_sec: u64) -> DhtResult
evict_stale(current_timestamp_sec: u64) -> EvictStaleResult
get_key_metadata(key: string, current_timestamp_sec: u64) -> GetKeyMetadataResult
get_values(key: string, current_timestamp_sec: u64) -> GetValuesResult
merge(records: [][]Record) -> MergeResult
merge_hack_get_values(records: []GetValuesResult) -> MergeResult
merge_two(a: []Record, b: []Record) -> MergeResult
propagate_host_value(set_host_value: PutHostValueResult, current_timestamp_sec: u64, weight: u32) -> DhtResult
put_host_value(key: string, value: string, current_timestamp_sec: u64, relay_id: []string, service_id: []string, weight: u32) -> PutHostValueResult
put_value(key: string, value: string, current_timestamp_sec: u64, relay_id: []string, service_id: []string, weight: u32) -> DhtResult
register_key(key: string, current_timestamp_sec: u64, pin: bool, weight: u32) -> DhtResult
renew_host_value(key: string, current_timestamp_sec: u64) -> DhtResult
republish_key(key: Key, current_timestamp_sec: u64) -> DhtResult
republish_values(key: string, records: []Record, current_timestamp_sec: u64) -> RepublishValuesResult
set_expired_timeout(timeout_sec: u64)
set_host_expired_timeout(timeout_sec: u64)
set_stale_timeout(timeout_sec: u64)