Skip to content

Commit 10cda09

Browse files
committed
fix paths to service definitions
1 parent 8849dd3 commit 10cda09

File tree

3 files changed

+15
-15
lines changed

3 files changed

+15
-15
lines changed

examples/services/mod.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
mod my_service;
2-
mod my_virtual_object;
3-
mod my_workflow;
1+
pub mod my_service;
2+
pub mod my_virtual_object;
3+
pub mod my_workflow;

src/context/mod.rs

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -226,7 +226,7 @@ impl<'ctx> WorkflowContext<'ctx> {
226226
/// # use std::convert::Infallible;
227227
/// # use std::time::Duration;
228228
/// #
229-
/// # async fn handle(ctx: Context<'_>) -> Result<(), Infallible> {
229+
/// # async fn handle(ctx: Context<'_>) -> Result<(), HandlerError> {
230230
/// ctx.sleep(Duration::from_secs(10)).await?;
231231
/// # Ok(())
232232
/// # }
@@ -267,10 +267,10 @@ impl<'ctx, CTX: private::SealedContext<'ctx>> ContextTimers<'ctx> for CTX {}
267267
/// You can do request-response calls to Services, Virtual Objects, and Workflows, in the following way:
268268
///
269269
/// ```rust,no_run
270-
/// # #[path = "../../examples/services"]
270+
/// # #[path = "../../examples/services/mod.rs"]
271271
/// # mod services;
272-
/// # use services::my_service::MyServiceClient;
273272
/// # use services::my_virtual_object::MyVirtualObjectClient;
273+
/// # use services::my_service::MyServiceClient;
274274
/// # use services::my_workflow::MyWorkflowClient;
275275
/// # use restate_sdk::prelude::*;
276276
/// #
@@ -330,10 +330,10 @@ impl<'ctx, CTX: private::SealedContext<'ctx>> ContextTimers<'ctx> for CTX {}
330330
/// Handlers can send messages (a.k.a. one-way calls, or fire-and-forget calls), as follows:
331331
///
332332
/// ```rust,no_run
333-
/// # #[path = "../../examples/services"]
333+
/// # #[path = "../../examples/services/mod.rs"]
334334
/// # mod services;
335-
/// # use services::my_service::MyServiceClient;
336335
/// # use services::my_virtual_object::MyVirtualObjectClient;
336+
/// # use services::my_service::MyServiceClient;
337337
/// # use services::my_workflow::MyWorkflowClient;
338338
/// # use restate_sdk::prelude::*;
339339
/// #
@@ -370,10 +370,10 @@ impl<'ctx, CTX: private::SealedContext<'ctx>> ContextTimers<'ctx> for CTX {}
370370
/// To schedule a delayed call, send a message with a delay parameter, as follows:
371371
///
372372
/// ```rust,no_run
373-
/// # #[path = "../examples/services"]
373+
/// # #[path = "../../examples/services/mod.rs"]
374374
/// # mod services;
375-
/// # use services::my_service::MyServiceClient;
376375
/// # use services::my_virtual_object::MyVirtualObjectClient;
376+
/// # use services::my_service::MyServiceClient;
377377
/// # use services::my_workflow::MyWorkflowClient;
378378
/// # use restate_sdk::prelude::*;
379379
/// # use std::time::Duration;
@@ -410,9 +410,9 @@ impl<'ctx, CTX: private::SealedContext<'ctx>> ContextTimers<'ctx> for CTX {}
410410
/// For example, assume a handler calls the same Virtual Object twice:
411411
///
412412
/// ```rust,no_run
413-
/// # #[path = "../../examples/services"]
414-
/// # mod services;
415-
/// # use services::my_virtual_object::MyVirtualObjectClient;
413+
/// # #[path = "../../examples/services/my_virtual_object.rs"]
414+
/// # mod my_virtual_object;
415+
/// # use my_virtual_object::MyVirtualObjectClient;
416416
/// # use restate_sdk::prelude::*;
417417
/// # async fn greet(ctx: Context<'_>, greeting: String) -> Result<(), HandlerError> {
418418
/// ctx.object_client::<MyVirtualObjectClient>("Mary")

src/http_server.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
//! 3. Listen on the specified port (default `9080`) for connections and requests.
88
//!
99
//! ```rust,no_run
10-
//! # #[path = "../examples/services"]
10+
//! # #[path = "../examples/services/mod.rs"]
1111
//! # mod services;
1212
//! # use services::my_service::{MyService, MyServiceImpl};
1313
//! # use services::my_virtual_object::{MyVirtualObject, MyVirtualObjectImpl};
@@ -38,7 +38,7 @@
3838
//! Add the identity key to your endpoint as follows:
3939
//!
4040
//! ```rust,no_run
41-
//! # #[path = "../examples/services"]
41+
//! # #[path = "../examples/services/mod.rs"]
4242
//! # mod services;
4343
//! # use services::my_service::{MyService, MyServiceImpl};
4444
//! # use restate_sdk::endpoint::Endpoint;

0 commit comments

Comments
 (0)