@@ -15,7 +15,7 @@ use thiserror::Error;
1515//
1616
1717/// HTTP Request type that can be shared over WASM boundary to apps.
18- /// This is the one you receive from the `http_server:sys:nectar ` service.
18+ /// This is the one you receive from the `http_server:distro:sys ` service.
1919#[ derive( Debug , Serialize , Deserialize ) ]
2020pub enum HttpServerRequest {
2121 Http ( IncomingHttpRequest ) ,
@@ -57,7 +57,7 @@ pub struct HttpResponse {
5757 // BODY is stored in the lazy_load_blob, as bytes
5858}
5959
60- /// Request type sent to `http_server:sys:nectar ` in order to configure it.
60+ /// Request type sent to `http_server:distro:sys ` in order to configure it.
6161/// You can also send [`type@HttpServerAction::WebSocketPush`], which
6262/// allows you to push messages across an existing open WebSocket connection.
6363///
@@ -210,7 +210,7 @@ impl IncomingHttpRequest {
210210}
211211
212212/// Request type that can be shared over WASM boundary to apps.
213- /// This is the one you send to the `http_client:sys:nectar ` service.
213+ /// This is the one you send to the `http_client:distro:sys ` service.
214214#[ derive( Debug , Serialize , Deserialize ) ]
215215pub enum HttpClientAction {
216216 Http ( OutgoingHttpRequest ) ,
@@ -229,7 +229,7 @@ pub enum HttpClientAction {
229229}
230230
231231/// HTTP Request type that can be shared over WASM boundary to apps.
232- /// This is the one you send to the `http_client:sys:nectar ` service.
232+ /// This is the one you send to the `http_client:distro:sys ` service.
233233#[ derive( Debug , Serialize , Deserialize ) ]
234234pub struct OutgoingHttpRequest {
235235 pub method : String , // must parse to http::Method
@@ -241,7 +241,7 @@ pub struct OutgoingHttpRequest {
241241}
242242
243243/// WebSocket Client Request type that can be shared over WASM boundary to apps.
244- /// This comes from an open websocket client connection in the `http_client:sys:nectar ` service.
244+ /// This comes from an open websocket client connection in the `http_client:distro:sys ` service.
245245#[ derive( Debug , Serialize , Deserialize ) ]
246246pub enum HttpClientRequest {
247247 WebSocketPush {
@@ -254,7 +254,7 @@ pub enum HttpClientRequest {
254254}
255255
256256/// HTTP Client Response type that can be shared over WASM boundary to apps.
257- /// This is the one you receive from the `http_client:sys:nectar ` service.
257+ /// This is the one you receive from the `http_client:distro:sys ` service.
258258#[ derive( Debug , Serialize , Deserialize ) ]
259259pub enum HttpClientResponse {
260260 Http ( HttpResponse ) ,
@@ -292,7 +292,7 @@ where
292292 T : Into < String > ,
293293{
294294 let res = uqRequest:: new ( )
295- . target ( ( "our" , "http_server" , "sys " , "nectar " ) )
295+ . target ( ( "our" , "http_server" , "distro " , "sys " ) )
296296 . body ( serde_json:: to_vec ( & HttpServerAction :: Bind {
297297 path : path. into ( ) ,
298298 authenticated,
@@ -322,14 +322,14 @@ where
322322 T : Into < String > ,
323323{
324324 let res = uqRequest:: new ( )
325- . target ( ( "our" , "http_server" , "sys " , "nectar " ) )
325+ . target ( ( "our" , "http_server" , "distro " , "sys " ) )
326326 . body ( serde_json:: to_vec ( & HttpServerAction :: Bind {
327327 path : path. into ( ) ,
328328 authenticated,
329329 local_only,
330330 cache : true ,
331331 } ) ?)
332- . blob ( crate :: nectar :: process:: standard:: LazyLoadBlob {
332+ . blob ( crate :: kinode :: process:: standard:: LazyLoadBlob {
333333 mime : content_type,
334334 bytes : content,
335335 } )
@@ -350,7 +350,7 @@ where
350350 T : Into < String > ,
351351{
352352 let res = uqRequest:: new ( )
353- . target ( ( "our" , "http_server" , "sys " , "nectar " ) )
353+ . target ( ( "our" , "http_server" , "distro " , "sys " ) )
354354 . body ( serde_json:: to_vec ( & HttpServerAction :: WebSocketBind {
355355 path : path. into ( ) ,
356356 authenticated,
@@ -391,7 +391,7 @@ pub fn send_request(
391391 body : Vec < u8 > ,
392392) -> anyhow:: Result < ( ) > {
393393 let req = uqRequest:: new ( )
394- . target ( ( "our" , "http_client" , "sys " , "nectar " ) )
394+ . target ( ( "our" , "http_client" , "distro " , "sys " ) )
395395 . body ( serde_json:: to_vec ( & HttpClientAction :: Http (
396396 OutgoingHttpRequest {
397397 method : method. to_string ( ) ,
@@ -417,7 +417,7 @@ pub fn send_request_await_response(
417417 body : Vec < u8 > ,
418418) -> std:: result:: Result < HttpClientResponse , HttpClientError > {
419419 let res = uqRequest:: new ( )
420- . target ( ( "our" , "http_client" , "sys " , "nectar " ) )
420+ . target ( ( "our" , "http_client" , "distro " , "sys " ) )
421421 . body (
422422 serde_json:: to_vec ( & HttpClientAction :: Http ( OutgoingHttpRequest {
423423 method : method. to_string ( ) ,
@@ -463,7 +463,7 @@ pub fn get_mime_type(filename: &str) -> String {
463463// Serve index.html
464464pub fn serve_index_html ( our : & Address , directory : & str ) -> anyhow:: Result < ( ) , anyhow:: Error > {
465465 let _ = uqRequest:: new ( )
466- . target ( "our@vfs:sys:nectar " . parse :: < Address > ( ) ?)
466+ . target ( "our@vfs:distro:sys " . parse :: < Address > ( ) ?)
467467 . body ( serde_json:: to_vec ( & VfsRequest {
468468 path : format ! ( "/{}/pkg/{}/index.html" , our. package_id( ) , directory) ,
469469 action : VfsAction :: Read ,
@@ -499,7 +499,7 @@ pub fn serve_ui(our: &Address, directory: &str) -> anyhow::Result<(), anyhow::Er
499499
500500 while let Some ( path) = queue. pop_front ( ) {
501501 let directory_response = uqRequest:: new ( )
502- . target ( "our@vfs:sys:nectar " . parse :: < Address > ( ) ?)
502+ . target ( "our@vfs:distro:sys " . parse :: < Address > ( ) ?)
503503 . body ( serde_json:: to_vec ( & VfsRequest {
504504 path,
505505 action : VfsAction :: ReadDir ,
@@ -526,7 +526,7 @@ pub fn serve_ui(our: &Address, directory: &str) -> anyhow::Result<(), anyhow::Er
526526 }
527527
528528 let _ = uqRequest:: new ( )
529- . target ( "our@vfs:sys:nectar " . parse :: < Address > ( ) ?)
529+ . target ( "our@vfs:distro:sys " . parse :: < Address > ( ) ?)
530530 . body ( serde_json:: to_vec ( & VfsRequest {
531531 path : entry. path . clone ( ) ,
532532 action : VfsAction :: Read ,
@@ -581,7 +581,7 @@ pub fn handle_ui_asset_request(
581581 let target_path = format ! ( "{}/{}" , directory, after_process. trim_start_matches( '/' ) ) ;
582582
583583 let _ = uqRequest:: new ( )
584- . target ( "our@vfs:sys:nectar " . parse :: < Address > ( ) ?)
584+ . target ( "our@vfs:distro:sys " . parse :: < Address > ( ) ?)
585585 . body ( serde_json:: to_vec ( & VfsRequest {
586586 path : format ! ( "{}/pkg/{}" , our. package_id( ) , target_path) ,
587587 action : VfsAction :: Read ,
@@ -617,7 +617,7 @@ pub fn send_ws_push(
617617 uqRequest:: new ( )
618618 . target ( Address :: new (
619619 node,
620- "http_server:sys:nectar " . parse :: < ProcessId > ( ) . unwrap ( ) ,
620+ "http_server:distro:sys " . parse :: < ProcessId > ( ) . unwrap ( ) ,
621621 ) )
622622 . body (
623623 serde_json:: json!( HttpServerRequest :: WebSocketPush {
@@ -643,7 +643,7 @@ pub fn open_ws_connection(
643643 uqRequest:: new ( )
644644 . target ( Address :: new (
645645 node,
646- ProcessId :: from_str ( "http_client:sys:nectar " ) . unwrap ( ) ,
646+ ProcessId :: from_str ( "http_client:distro:sys " ) . unwrap ( ) ,
647647 ) )
648648 . body (
649649 serde_json:: json!( HttpClientAction :: WebSocketOpen {
@@ -669,7 +669,7 @@ pub fn open_ws_connection_and_await(
669669 uqRequest:: new ( )
670670 . target ( Address :: new (
671671 node,
672- ProcessId :: from_str ( "http_client:sys:nectar " ) . unwrap ( ) ,
672+ ProcessId :: from_str ( "http_client:distro:sys " ) . unwrap ( ) ,
673673 ) )
674674 . body (
675675 serde_json:: json!( HttpClientAction :: WebSocketOpen {
@@ -693,7 +693,7 @@ pub fn send_ws_client_push(
693693 uqRequest:: new ( )
694694 . target ( Address :: new (
695695 node,
696- ProcessId :: from_str ( "http_client:sys:nectar " ) . unwrap ( ) ,
696+ ProcessId :: from_str ( "http_client:distro:sys " ) . unwrap ( ) ,
697697 ) )
698698 . body (
699699 serde_json:: json!( HttpClientAction :: WebSocketPush {
@@ -712,7 +712,7 @@ pub fn close_ws_connection(node: String, channel_id: u32) -> anyhow::Result<()>
712712 uqRequest:: new ( )
713713 . target ( Address :: new (
714714 node,
715- ProcessId :: from_str ( "http_client:sys:nectar " ) . unwrap ( ) ,
715+ ProcessId :: from_str ( "http_client:distro:sys " ) . unwrap ( ) ,
716716 ) )
717717 . body (
718718 serde_json:: json!( HttpClientAction :: WebSocketClose { channel_id } )
@@ -732,7 +732,7 @@ pub fn close_ws_connection_and_await(
732732 uqRequest:: new ( )
733733 . target ( Address :: new (
734734 node,
735- ProcessId :: from_str ( "http_client:sys:nectar " ) . unwrap ( ) ,
735+ ProcessId :: from_str ( "http_client:distro:sys " ) . unwrap ( ) ,
736736 ) )
737737 . body (
738738 serde_json:: json!( HttpClientAction :: WebSocketClose { channel_id } )
0 commit comments