@@ -15,7 +15,7 @@ use thiserror::Error;
15
15
//
16
16
17
17
/// 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.
19
19
#[ derive( Debug , Serialize , Deserialize ) ]
20
20
pub enum HttpServerRequest {
21
21
Http ( IncomingHttpRequest ) ,
@@ -57,7 +57,7 @@ pub struct HttpResponse {
57
57
// BODY is stored in the lazy_load_blob, as bytes
58
58
}
59
59
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.
61
61
/// You can also send [`type@HttpServerAction::WebSocketPush`], which
62
62
/// allows you to push messages across an existing open WebSocket connection.
63
63
///
@@ -210,7 +210,7 @@ impl IncomingHttpRequest {
210
210
}
211
211
212
212
/// 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.
214
214
#[ derive( Debug , Serialize , Deserialize ) ]
215
215
pub enum HttpClientAction {
216
216
Http ( OutgoingHttpRequest ) ,
@@ -229,7 +229,7 @@ pub enum HttpClientAction {
229
229
}
230
230
231
231
/// 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.
233
233
#[ derive( Debug , Serialize , Deserialize ) ]
234
234
pub struct OutgoingHttpRequest {
235
235
pub method : String , // must parse to http::Method
@@ -241,7 +241,7 @@ pub struct OutgoingHttpRequest {
241
241
}
242
242
243
243
/// 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.
245
245
#[ derive( Debug , Serialize , Deserialize ) ]
246
246
pub enum HttpClientRequest {
247
247
WebSocketPush {
@@ -254,7 +254,7 @@ pub enum HttpClientRequest {
254
254
}
255
255
256
256
/// 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.
258
258
#[ derive( Debug , Serialize , Deserialize ) ]
259
259
pub enum HttpClientResponse {
260
260
Http ( HttpResponse ) ,
@@ -292,7 +292,7 @@ where
292
292
T : Into < String > ,
293
293
{
294
294
let res = uqRequest:: new ( )
295
- . target ( ( "our" , "http_server" , "sys " , "nectar " ) )
295
+ . target ( ( "our" , "http_server" , "distro " , "sys " ) )
296
296
. body ( serde_json:: to_vec ( & HttpServerAction :: Bind {
297
297
path : path. into ( ) ,
298
298
authenticated,
@@ -322,14 +322,14 @@ where
322
322
T : Into < String > ,
323
323
{
324
324
let res = uqRequest:: new ( )
325
- . target ( ( "our" , "http_server" , "sys " , "nectar " ) )
325
+ . target ( ( "our" , "http_server" , "distro " , "sys " ) )
326
326
. body ( serde_json:: to_vec ( & HttpServerAction :: Bind {
327
327
path : path. into ( ) ,
328
328
authenticated,
329
329
local_only,
330
330
cache : true ,
331
331
} ) ?)
332
- . blob ( crate :: nectar :: process:: standard:: LazyLoadBlob {
332
+ . blob ( crate :: kinode :: process:: standard:: LazyLoadBlob {
333
333
mime : content_type,
334
334
bytes : content,
335
335
} )
@@ -350,7 +350,7 @@ where
350
350
T : Into < String > ,
351
351
{
352
352
let res = uqRequest:: new ( )
353
- . target ( ( "our" , "http_server" , "sys " , "nectar " ) )
353
+ . target ( ( "our" , "http_server" , "distro " , "sys " ) )
354
354
. body ( serde_json:: to_vec ( & HttpServerAction :: WebSocketBind {
355
355
path : path. into ( ) ,
356
356
authenticated,
@@ -391,7 +391,7 @@ pub fn send_request(
391
391
body : Vec < u8 > ,
392
392
) -> anyhow:: Result < ( ) > {
393
393
let req = uqRequest:: new ( )
394
- . target ( ( "our" , "http_client" , "sys " , "nectar " ) )
394
+ . target ( ( "our" , "http_client" , "distro " , "sys " ) )
395
395
. body ( serde_json:: to_vec ( & HttpClientAction :: Http (
396
396
OutgoingHttpRequest {
397
397
method : method. to_string ( ) ,
@@ -417,7 +417,7 @@ pub fn send_request_await_response(
417
417
body : Vec < u8 > ,
418
418
) -> std:: result:: Result < HttpClientResponse , HttpClientError > {
419
419
let res = uqRequest:: new ( )
420
- . target ( ( "our" , "http_client" , "sys " , "nectar " ) )
420
+ . target ( ( "our" , "http_client" , "distro " , "sys " ) )
421
421
. body (
422
422
serde_json:: to_vec ( & HttpClientAction :: Http ( OutgoingHttpRequest {
423
423
method : method. to_string ( ) ,
@@ -463,7 +463,7 @@ pub fn get_mime_type(filename: &str) -> String {
463
463
// Serve index.html
464
464
pub fn serve_index_html ( our : & Address , directory : & str ) -> anyhow:: Result < ( ) , anyhow:: Error > {
465
465
let _ = uqRequest:: new ( )
466
- . target ( "our@vfs:sys:nectar " . parse :: < Address > ( ) ?)
466
+ . target ( "our@vfs:distro:sys " . parse :: < Address > ( ) ?)
467
467
. body ( serde_json:: to_vec ( & VfsRequest {
468
468
path : format ! ( "/{}/pkg/{}/index.html" , our. package_id( ) , directory) ,
469
469
action : VfsAction :: Read ,
@@ -499,7 +499,7 @@ pub fn serve_ui(our: &Address, directory: &str) -> anyhow::Result<(), anyhow::Er
499
499
500
500
while let Some ( path) = queue. pop_front ( ) {
501
501
let directory_response = uqRequest:: new ( )
502
- . target ( "our@vfs:sys:nectar " . parse :: < Address > ( ) ?)
502
+ . target ( "our@vfs:distro:sys " . parse :: < Address > ( ) ?)
503
503
. body ( serde_json:: to_vec ( & VfsRequest {
504
504
path,
505
505
action : VfsAction :: ReadDir ,
@@ -526,7 +526,7 @@ pub fn serve_ui(our: &Address, directory: &str) -> anyhow::Result<(), anyhow::Er
526
526
}
527
527
528
528
let _ = uqRequest:: new ( )
529
- . target ( "our@vfs:sys:nectar " . parse :: < Address > ( ) ?)
529
+ . target ( "our@vfs:distro:sys " . parse :: < Address > ( ) ?)
530
530
. body ( serde_json:: to_vec ( & VfsRequest {
531
531
path : entry. path . clone ( ) ,
532
532
action : VfsAction :: Read ,
@@ -581,7 +581,7 @@ pub fn handle_ui_asset_request(
581
581
let target_path = format ! ( "{}/{}" , directory, after_process. trim_start_matches( '/' ) ) ;
582
582
583
583
let _ = uqRequest:: new ( )
584
- . target ( "our@vfs:sys:nectar " . parse :: < Address > ( ) ?)
584
+ . target ( "our@vfs:distro:sys " . parse :: < Address > ( ) ?)
585
585
. body ( serde_json:: to_vec ( & VfsRequest {
586
586
path : format ! ( "{}/pkg/{}" , our. package_id( ) , target_path) ,
587
587
action : VfsAction :: Read ,
@@ -617,7 +617,7 @@ pub fn send_ws_push(
617
617
uqRequest:: new ( )
618
618
. target ( Address :: new (
619
619
node,
620
- "http_server:sys:nectar " . parse :: < ProcessId > ( ) . unwrap ( ) ,
620
+ "http_server:distro:sys " . parse :: < ProcessId > ( ) . unwrap ( ) ,
621
621
) )
622
622
. body (
623
623
serde_json:: json!( HttpServerRequest :: WebSocketPush {
@@ -643,7 +643,7 @@ pub fn open_ws_connection(
643
643
uqRequest:: new ( )
644
644
. target ( Address :: new (
645
645
node,
646
- ProcessId :: from_str ( "http_client:sys:nectar " ) . unwrap ( ) ,
646
+ ProcessId :: from_str ( "http_client:distro:sys " ) . unwrap ( ) ,
647
647
) )
648
648
. body (
649
649
serde_json:: json!( HttpClientAction :: WebSocketOpen {
@@ -669,7 +669,7 @@ pub fn open_ws_connection_and_await(
669
669
uqRequest:: new ( )
670
670
. target ( Address :: new (
671
671
node,
672
- ProcessId :: from_str ( "http_client:sys:nectar " ) . unwrap ( ) ,
672
+ ProcessId :: from_str ( "http_client:distro:sys " ) . unwrap ( ) ,
673
673
) )
674
674
. body (
675
675
serde_json:: json!( HttpClientAction :: WebSocketOpen {
@@ -693,7 +693,7 @@ pub fn send_ws_client_push(
693
693
uqRequest:: new ( )
694
694
. target ( Address :: new (
695
695
node,
696
- ProcessId :: from_str ( "http_client:sys:nectar " ) . unwrap ( ) ,
696
+ ProcessId :: from_str ( "http_client:distro:sys " ) . unwrap ( ) ,
697
697
) )
698
698
. body (
699
699
serde_json:: json!( HttpClientAction :: WebSocketPush {
@@ -712,7 +712,7 @@ pub fn close_ws_connection(node: String, channel_id: u32) -> anyhow::Result<()>
712
712
uqRequest:: new ( )
713
713
. target ( Address :: new (
714
714
node,
715
- ProcessId :: from_str ( "http_client:sys:nectar " ) . unwrap ( ) ,
715
+ ProcessId :: from_str ( "http_client:distro:sys " ) . unwrap ( ) ,
716
716
) )
717
717
. body (
718
718
serde_json:: json!( HttpClientAction :: WebSocketClose { channel_id } )
@@ -732,7 +732,7 @@ pub fn close_ws_connection_and_await(
732
732
uqRequest:: new ( )
733
733
. target ( Address :: new (
734
734
node,
735
- ProcessId :: from_str ( "http_client:sys:nectar " ) . unwrap ( ) ,
735
+ ProcessId :: from_str ( "http_client:distro:sys " ) . unwrap ( ) ,
736
736
) )
737
737
. body (
738
738
serde_json:: json!( HttpClientAction :: WebSocketClose { channel_id } )
0 commit comments