add service id and name to generated .aqua

This commit is contained in:
Alexey Proshutinskiy 2021-05-25 13:01:21 +03:00
parent d8d9c902b4
commit 41bd28b352
2 changed files with 39 additions and 39 deletions

View File

@ -1,3 +1,8 @@
data Key:
key: string
peer_id: string
timestamp_created: u64
data Record:
value: string
peer_id: string
@ -5,39 +10,6 @@ data Record:
service_id: []string
timestamp_created: u64
data GetValuesResult:
success: bool
error: string
result: []Record
data PutValueResult:
success: bool
error: string
data Key:
key: string
peer_id: string
timestamp_created: u64
data GetKeyMetadataResult:
success: bool
error: string
key: Key
data RepublishKeyResult:
success: bool
error: string
data RegisterKeyResult:
success: bool
error: string
data ClearExpiredResult:
success: bool
error: string
count_keys: u64
count_values: u64
data EvictStaleItem:
key: Key
records: []Record
@ -47,17 +19,45 @@ data EvictStaleResult:
error: string
results: []EvictStaleItem
data GetValuesResult:
success: bool
error: string
result: []Record
data GetKeyMetadataResult:
success: bool
error: string
key: Key
data ClearExpiredResult:
success: bool
error: string
count_keys: u64
count_values: u64
data RepublishKeyResult:
success: bool
error: string
data PutValueResult:
success: bool
error: string
data RegisterKeyResult:
success: bool
error: string
data RepublishValuesResult:
success: bool
error: string
updated: u64
service AquaDht:
get_values(key: string, current_timestamp: u64) -> GetValuesResult
put_value(key: string, value: string, current_timestamp: u64, relay_id: []string, service_id: []string) -> PutValueResult
republish_values(key: string, records: []Record, current_timestamp: u64) -> RepublishValuesResult
register_key(key: string, current_timestamp: u64) -> RegisterKeyResult
service AquaDHT("aqua-dht"):
republish_key(key: Key, current_timestamp: u64) -> RepublishKeyResult
clear_expired(current_timestamp: u64) -> ClearExpiredResult
put_value(key: string, value: string, current_timestamp: u64, relay_id: []string, service_id: []string) -> PutValueResult
register_key(key: string, current_timestamp: u64) -> RegisterKeyResult
get_key_metadata(key: string, current_timestamp: u64) -> GetKeyMetadataResult
get_values(key: string, current_timestamp: u64) -> GetValuesResult
republish_values(key: string, records: []Record, current_timestamp: u64) -> RepublishValuesResult
evict_stale(current_timestamp: u64) -> EvictStaleResult

View File

@ -9,4 +9,4 @@ rm -f artifacts/*
mkdir -p artifacts
cp target/wasm32-wasi/release/aqua-dht.wasm artifacts/
curl -L https://github.com/fluencelabs/sqlite/releases/download/v0.14.0_w/sqlite3.wasm -o artifacts/sqlite3.wasm
marine aqua artifacts/aqua-dht.wasm > aqua/aqua-dht.aqua
marine aqua artifacts/aqua-dht.wasm -s AquaDHT -i aqua-dht > aqua/aqua-dht.aqua