mirror of
https://gitlab.com/veilid/veilid.git
synced 2025-07-30 18:28:48 -04:00
api and log refactor
This commit is contained in:
parent
f409c84778
commit
c106d324c8
25 changed files with 662 additions and 501 deletions
|
@ -27,6 +27,13 @@ class VeilidJS implements Veilid {
|
|||
wasm, "configure_veilid_platform", [platformConfigJsonString]);
|
||||
}
|
||||
|
||||
@override
|
||||
void changeLogLevel(String layer, VeilidConfigLogLevel logLevel) {
|
||||
var logLevelJsonString =
|
||||
jsonEncode(logLevel.json, toEncodable: veilidApiToEncodable);
|
||||
js_util.callMethod(wasm, "change_log_level", [layer, logLevelJsonString]);
|
||||
}
|
||||
|
||||
@override
|
||||
Stream<VeilidUpdate> startupVeilidCore(VeilidConfig config) async* {
|
||||
var streamController = StreamController<VeilidUpdate>();
|
||||
|
@ -53,12 +60,6 @@ class VeilidJS implements Veilid {
|
|||
js_util.callMethod(wasm, "get_veilid_state", []))));
|
||||
}
|
||||
|
||||
@override
|
||||
Future<void> changeApiLogLevel(VeilidConfigLogLevel logLevel) {
|
||||
return _wrapApiPromise(js_util.callMethod(wasm, "change_api_log_level",
|
||||
[jsonEncode(logLevel.json, toEncodable: veilidApiToEncodable)]));
|
||||
}
|
||||
|
||||
@override
|
||||
Future<void> shutdownVeilidCore() {
|
||||
return _wrapApiPromise(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue