mirror of
https://github.com/fluencelabs/fluent-pad
synced 2025-04-25 08:52:14 +00:00
add configs for frepl, fmt
This commit is contained in:
parent
77d5329ca6
commit
cc7ef8b24e
@ -14,15 +14,14 @@
|
|||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
mod errors;
|
|
||||||
mod entry;
|
mod entry;
|
||||||
|
mod errors;
|
||||||
mod results;
|
mod results;
|
||||||
mod service_api;
|
mod service_api;
|
||||||
mod storage_api;
|
mod storage_api;
|
||||||
mod utils;
|
mod utils;
|
||||||
|
|
||||||
use fluence::WasmLoggerBuilder;
|
use fluence::WasmLoggerBuilder;
|
||||||
use storage_api::init;
|
|
||||||
|
|
||||||
pub(crate) type Result<T> = std::result::Result<T, errors::HistoryError>;
|
pub(crate) type Result<T> = std::result::Result<T, errors::HistoryError>;
|
||||||
|
|
||||||
@ -31,9 +30,4 @@ pub fn main() {
|
|||||||
.with_log_level(log::Level::Info)
|
.with_log_level(log::Level::Info)
|
||||||
.build()
|
.build()
|
||||||
.unwrap();
|
.unwrap();
|
||||||
|
|
||||||
match init() {
|
|
||||||
Ok(_) => log::info!("db created"),
|
|
||||||
Err(e) => log::error!("sqlite db creation failed: {}", e),
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
@ -16,11 +16,11 @@
|
|||||||
|
|
||||||
use crate::storage_api::*;
|
use crate::storage_api::*;
|
||||||
|
|
||||||
|
use crate::entry::Entry;
|
||||||
use crate::results::{AddServiceResult, EmptyResult, GetEntriesServiceResult};
|
use crate::results::{AddServiceResult, EmptyResult, GetEntriesServiceResult};
|
||||||
use crate::utils::u64_to_usize;
|
use crate::utils::u64_to_usize;
|
||||||
use crate::Result;
|
use crate::Result;
|
||||||
use fluence::{fce, CallParameters, SecurityTetraplet};
|
use fluence::{fce, CallParameters};
|
||||||
use crate::entry::Entry;
|
|
||||||
|
|
||||||
pub const SUCCESS_CODE: i32 = 0;
|
pub const SUCCESS_CODE: i32 = 0;
|
||||||
|
|
||||||
|
@ -37,10 +37,6 @@ pub struct Data {
|
|||||||
|
|
||||||
static INSTANCE: OnceCell<Mutex<Data>> = OnceCell::new();
|
static INSTANCE: OnceCell<Mutex<Data>> = OnceCell::new();
|
||||||
|
|
||||||
pub fn init() -> Result<()> {
|
|
||||||
Ok(())
|
|
||||||
}
|
|
||||||
|
|
||||||
fn get_data() -> &'static Mutex<Data> {
|
fn get_data() -> &'static Mutex<Data> {
|
||||||
INSTANCE.get_or_init(|| <_>::default())
|
INSTANCE.get_or_init(|| <_>::default())
|
||||||
}
|
}
|
||||||
|
6
services/history_Config.toml
Normal file
6
services/history_Config.toml
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
modules_dir = "artifacts"
|
||||||
|
|
||||||
|
[[module]]
|
||||||
|
name = "history"
|
||||||
|
mem_pages_count = 100
|
||||||
|
logger_enabled = true
|
6
services/userlist_Config.toml
Normal file
6
services/userlist_Config.toml
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
modules_dir = "artifacts"
|
||||||
|
|
||||||
|
[[module]]
|
||||||
|
name = "user-list"
|
||||||
|
mem_pages_count = 100
|
||||||
|
logger_enabled = true
|
Loading…
x
Reference in New Issue
Block a user