You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: adapter/rest/src/main.rs
+26-3Lines changed: 26 additions & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -21,9 +21,9 @@ use std::net::SocketAddr;
21
21
use std::sync::Arc;
22
22
use tokio::net::TcpListener;
23
23
use tonic::async_trait;
24
-
use tucana::shared::value::Kind::StructValue;
25
-
use tucana::shared::{ListValue, value::Kind};
24
+
use tucana::shared::{AdapterConfiguration,RuntimeFeature, value::Kind};
26
25
use tucana::shared::{Struct,ValidationFlow,Value};
26
+
use tucana::shared::{Translation, value::Kind::StructValue};
27
27
28
28
mod config;
29
29
mod route;
@@ -39,7 +39,30 @@ async fn main() {
39
39
Err(err) => panic!("Failed to create server runner: {:?}", err),
40
40
};
41
41
log::info!("Successfully created runner for http service");
42
-
match runner.serve().await{
42
+
43
+
let addr = runner.get_server_config().port;
44
+
let host = runner.get_server_config().host.clone();
45
+
46
+
let featues = vec![RuntimeFeature{
47
+
name: vec![Translation{
48
+
code:"en-US".to_string(),
49
+
content:"Rest Adapter".to_string(),
50
+
}],
51
+
description: vec![Translation{
52
+
code:"en-US".to_string(),
53
+
content:"A Rest-Adapter is a server that exposes resources through HTTP URLs (endpoints). Clients use methods like GET, POST, PUT, and DELETE to retrieve or modify data, typically exchanged as JSON.".to_string(),
0 commit comments