registry/aqua/registry.aqua
2022-03-10 19:49:38 +04:00

98 lines
3.2 KiB
Plaintext

module Registry declares *
data ClearExpiredResult:
success: bool
error: string
count_routes: u64
count_values: u64
data DhtResult:
success: bool
error: string
data Route:
id: string
label: string
peer_id: string
timestamp_created: u64
challenge: []u8
challenge_type: string
signature: []u8
data Record:
route_id: string
value: string
peer_id: string
set_by: string
relay_id: []string
service_id: []string
timestamp_created: u64
solution: []u8
signature: []u8
data EvictStaleItem:
route: Route
records: []Record
data EvictStaleResult:
success: bool
error: string
results: []EvictStaleItem
data GetRouteMetadataResult:
success: bool
error: string
route: Route
data GetValuesResult:
success: bool
error: string
result: []Record
data MergeResult:
success: bool
error: string
result: []Record
data PutHostRecordResult:
success: bool
error: string
value: []Record
data RegisterRouteResult:
success: bool
error: string
route_id: string
data RepublishValuesResult:
success: bool
error: string
updated: u64
data WeightResult:
success: bool
weight: u32
peer_id: string
error: string
service Registry("registry"):
clear_expired(current_timestamp_sec: u64) -> ClearExpiredResult
clear_host_record(route_id: string, current_timestamp_sec: u64) -> DhtResult
evict_stale(current_timestamp_sec: u64) -> EvictStaleResult
get_host_record_bytes(route_id: string, value: string, relay_id: []string, service_id: []string, timestamp_created: u64, solution: []u8) -> []u8
get_record_bytes(route_id: string, value: string, relay_id: []string, service_id: []string, timestamp_created: u64, solution: []u8) -> []u8
get_records(route_id: string, current_timestamp_sec: u64) -> GetValuesResult
get_route_bytes(label: string, peer_id: []string, timestamp_created: u64, challenge: []u8, challenge_type: string) -> []u8
get_route_id(label: string, peer_id: string) -> string
get_route_metadata(route_id: string, current_timestamp_sec: u64) -> GetRouteMetadataResult
merge(records: [][]Record) -> MergeResult
merge_two(a: []Record, b: []Record) -> MergeResult
propagate_host_record(set_host_value: PutHostRecordResult, current_timestamp_sec: u64, weight: WeightResult) -> DhtResult
put_host_record(route_id: string, value: string, relay_id: []string, service_id: []string, timestamp_created: u64, solution: []u8, signature: []u8, weight: WeightResult, current_timestamp_sec: u64) -> PutHostRecordResult
put_record(route_id: string, value: string, relay_id: []string, service_id: []string, timestamp_created: u64, solution: []u8, signature: []u8, weight: WeightResult, current_timestamp_sec: u64) -> DhtResult
register_route(label: string, peer_id: []string, timestamp_created: u64, challenge: []u8, challenge_type: string, signature: []u8, pin: bool, weight: WeightResult, current_timestamp_sec: u64) -> RegisterRouteResult
republish_records(records: []Record, weights: []WeightResult, current_timestamp_sec: u64) -> RepublishValuesResult
republish_route(route: Route, weight: WeightResult, current_timestamp_sec: u64) -> DhtResult
set_expired_timeout(timeout_sec: u64)
set_stale_timeout(timeout_sec: u64)