@@ -3,6 +3,7 @@ use base::{
33 store:: { FlowExecutionResult , FlowIdentifyResult } ,
44 traits:: Server as ServerTrait ,
55} ;
6+ use code0_flow:: flow_service:: ModuleDefinitionAppendix ;
67use http_body_util:: { BodyExt , Full } ;
78use hyper:: server:: conn:: http1;
89use hyper:: { Request , Response } ;
@@ -17,7 +18,7 @@ use std::sync::Arc;
1718use tokio:: net:: TcpListener ;
1819use tonic:: async_trait;
1920use tucana:: shared:: {
20- AdapterStatusConfiguration , Struct , ValidationFlow , Value , helper:: value:: ToValue , value:: Kind ,
21+ Endpoint , ModuleDefinition , Struct , ValidationFlow , Value , helper:: value:: ToValue , value:: Kind ,
2122} ;
2223
2324use crate :: response:: { error_to_http_response, value_to_http_response} ;
@@ -42,14 +43,18 @@ async fn main() {
4243 let addr = runner. get_server_config ( ) . port ;
4344 let host = runner. get_server_config ( ) . host . clone ( ) ;
4445
45- let configs = vec ! [ AdapterStatusConfiguration {
46- flow_type_identifiers: vec![ String :: from( "REST" ) ] ,
47- data: Some (
48- tucana:: shared:: adapter_status_configuration:: Data :: Endpoint ( format!(
49- r"{}:{}/${{project_slug}}/${{flow_setting_identifier}}" ,
50- host, addr
46+ let configs = vec ! [ ModuleDefinitionAppendix {
47+ module_identifier: String :: from( "draco-rest" ) ,
48+ definitions: vec![ ModuleDefinition {
49+ flow_type_identifier: vec![ String :: from( "REST" ) ] ,
50+ value: Some ( tucana:: shared:: module_definition:: Value :: Endpoint (
51+ Endpoint {
52+ host,
53+ port: addr as i64 ,
54+ endpoint: String :: from( r"/${{project_slug}}${{httpURL}}" ) ,
55+ } ,
5156 ) ) ,
52- ) ,
57+ } ] ,
5358 } ] ;
5459 match runner. serve ( configs) . await {
5560 Ok ( _) => ( ) ,
0 commit comments