Skip to content

Commit 5b63779

Browse files
committed
Fix broken links
1 parent 6c27993 commit 5b63779

File tree

3 files changed

+27
-24
lines changed

3 files changed

+27
-24
lines changed

src/context/mod.rs

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -216,7 +216,7 @@ impl<'ctx> WorkflowContext<'ctx> {
216216
///
217217
/// ## Scheduling Async Tasks
218218
///
219-
/// To schedule a handler to be called at a later time, have a look at the documentation on [delayed calls][service_communication#delayed-calls].
219+
/// To schedule a handler to be called at a later time, have a look at the documentation on [delayed calls][crate::context::ContextClient#delayed-calls].
220220
///
221221
///
222222
/// ## Durable sleep
@@ -577,7 +577,7 @@ impl<'ctx, CTX: private::SealedContext<'ctx>> ContextClient<'ctx> for CTX {}
577577
/// ## Completing awakeables
578578
///
579579
/// The external process completes the awakeable by either resolving it with an optional payload or by rejecting it
580-
/// with its ID and a reason for the failure. This throws [a terminal error][error_handling] in the waiting handler.
580+
/// with its ID and a reason for the failure. This throws [a terminal error][crate::errors] in the waiting handler.
581581
///
582582
/// - Resolving over HTTP with its ID and an optional payload:
583583
///
@@ -609,7 +609,7 @@ impl<'ctx, CTX: private::SealedContext<'ctx>> ContextClient<'ctx> for CTX {}
609609
/// # }
610610
/// ```
611611
///
612-
/// **Note**: You can return any payload that implements the `serde::Serialize` and `serde::Deserialize` traits ([see serialization docs][serialization]).
612+
/// **Note**: You can return any payload that implements the `serde::Serialize` and `serde::Deserialize` traits ([see serialization docs][crate::serde]).
613613
///
614614
/// **Note**: When running on Function-as-a-Service platforms, such as AWS Lambda, Restate suspends the handler while waiting for the awakeable to be completed.
615615
/// Since you only pay for the time that the handler is actually running, you don't pay while waiting for the external process to return.
@@ -644,8 +644,8 @@ impl<'ctx, CTX: private::SealedContext<'ctx>> ContextAwakeables<'ctx> for CTX {}
644644
/// Restate uses an execution log for replay after failures and suspensions.
645645
/// This means that non-deterministic results (e.g. database responses, UUID generation) need to be stored in the execution log.
646646
/// The SDK offers some functionalities to help you with this:
647-
/// 1. **[Journaled actions][journaling_results#journaled-actions]**: Run any block of code and store the result in Restate. Restate replays the result instead of re-executing the block on retries.
648-
/// 3. **[Random generators][journaling_results#generating-randoms]**: Built-in helpers for generating stable UUIDs and random numbers.
647+
/// 1. **[Journaled actions][crate::context::ContextSideEffects#journaled-actions]**: Run any block of code and store the result in Restate. Restate replays the result instead of re-executing the block on retries.
648+
/// 3. **[Random generators][crate::context::ContextSideEffects#generating-randoms]**: Built-in helpers for generating stable UUIDs and random numbers.
649649
///
650650
/// ## Journaled actions
651651
/// You can store the result of a (non-deterministic) operation in the Restate execution log (e.g. database requests, HTTP calls, etc).
@@ -666,7 +666,7 @@ impl<'ctx, CTX: private::SealedContext<'ctx>> ContextAwakeables<'ctx> for CTX {}
666666
/// You cannot use the Restate context within `ctx.run`.
667667
/// This includes actions such as getting state, calling another service, and nesting other journaled actions.
668668
///
669-
/// You can store any result value that implements the `Serialize` and `Deserialize` trait ([see serialization docs][serialization]).
669+
/// You can store any result value that implements the `Serialize` and `Deserialize` trait ([see serialization docs][crate::serde]).
670670
///
671671
/// **Caution: Immediately await journaled actions:**
672672
/// Always immediately await `ctx.run`, before doing any other context calls.
@@ -755,7 +755,7 @@ impl<'ctx, CTX: private::SealedContext<'ctx>> ContextSideEffects<'ctx> for CTX {
755755
/// Have a look at the [introspection docs](https://docs.restate.dev//operate/introspection#inspecting-application-state) for more information.
756756
///
757757
/// **Info: Serializing state**:
758-
/// You can store any type of value that that implements the `serde::Serialize` and `serde::Deserialize` traits ([see serialization docs][serialization]).
758+
/// You can store any type of value that that implements the `serde::Serialize` and `serde::Deserialize` traits ([see serialization docs][crate::serde]).
759759
///
760760
/// ```
761761
/// # use restate_sdk::prelude::*;
@@ -818,7 +818,7 @@ impl<'ctx, CTX: private::SealedContext<'ctx> + private::SealedCanReadState> Cont
818818
/// Have a look at the [introspection docs](https://docs.restate.dev//operate/introspection#inspecting-application-state) for more information.
819819
///
820820
/// **Info: Serializing state**:
821-
/// You can store any type of value that that implements the `serde::Serialize` and `serde::Deserialize` traits ([see serialization docs][serialization]).
821+
/// You can store any type of value that that implements the `serde::Serialize` and `serde::Deserialize` traits ([see serialization docs][crate::serde]).
822822
///
823823
/// ```
824824
/// # use restate_sdk::prelude::*;

src/errors.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
//! # }
1616
//! ```
1717
//!
18-
//! You can catch terminal exceptions. For example, you can catch the terminal exception that comes out of a [call to another service][service_communication#request-response-calls], and build your control flow around it.
18+
//! You can catch terminal exceptions. For example, you can catch the terminal exception that comes out of a [call to another service][crate::context::ContextClient], and build your control flow around it.
1919
use restate_sdk_shared_core::Failure;
2020
use std::error::Error as StdError;
2121
use std::fmt;

src/lib.rs

Lines changed: 18 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -40,14 +40,17 @@
4040
//! - [Workflow](workflow)
4141
//!
4242
//! ## Features
43-
//! - [Service Communication][crate::context::ContextClient]
44-
//! - [Journaling Results][crate::context::ContextSideEffects]
45-
//! - State: [read][crate::context::ContextReadState] and [write](crate::context::ContextWriteState)
46-
//! - [Scheduling & Timers][crate::context::ContextTimers]
47-
//! - [Awakeables][crate::context::ContextAwakeables]
48-
//! - [Error Handling][crate::errors]
49-
//! - [Serialization][crate::serde]
50-
//! - [Serving][crate::http_server]
43+
//!
44+
//! Have a look at the following SDK capabilities:
45+
//!
46+
//! - [Service Communication][crate::context::ContextClient]: Durable RPC and messaging between services (optionally with a delay).
47+
//! - [Journaling Results][crate::context::ContextSideEffects]: Persist results in Restate's log to avoid re-execution on retries
48+
//! - State: [read][crate::context::ContextReadState] and [write](crate::context::ContextWriteState): Store and retrieve state in Restate's key-value store
49+
//! - [Scheduling & Timers][crate::context::ContextTimers]: Let a handler pause for a certain amount of time. Restate durably tracks the timer across failures.
50+
//! - [Awakeables][crate::context::ContextAwakeables]: Durable Futures to wait for events and the completion of external tasks.
51+
//! - [Error Handling][crate::errors]: Restate retries failures infinitely. Use `TerminalError` to stop retries.
52+
//! - [Serialization][crate::serde]: The SDK serializes results to send them to the Server.
53+
//! - [Serving][crate::http_server]: Start an HTTP server to expose services.
5154
//!
5255
//!
5356
//! # Logging
@@ -204,11 +207,11 @@ pub use restate_sdk_macros::object;
204207
/// - Each workflow definition has a `run` handler that implements the workflow logic.
205208
/// - The `run` handler executes exactly one time for each workflow instance (object / key).
206209
/// - A workflow definition can implement other handlers that can be called multiple times, and can interact with the workflow.
207-
/// - Workflows have access to the `WorkflowContext` and `SharedWorkflowContext`, giving them some extra functionality, for example [Durable Promises][workflows#signaling-workflows] to signal workflows.
210+
/// - Workflows have access to the `WorkflowContext` and `SharedWorkflowContext`, giving them some extra functionality, for example Durable Promises to signal workflows.
208211
///
209212
/// **Note: Workflow retention time**:
210213
/// The retention time of a workflow execution is 24 hours after the finishing of the `run` handler.
211-
/// After this timeout any [K/V state][state] is cleared, the workflow's shared handlers cannot be called anymore, and the [Durable Promises][workflows#signaling-workflows] are discarded.
214+
/// After this timeout any [K/V state][crate::context::ContextReadState] is cleared, the workflow's shared handlers cannot be called anymore, and the Durable Promises are discarded.
212215
/// The retention time can be configured via the [Admin API](https://docs.restate.dev//references/admin-api/#tag/service/operation/modify_service) per Workflow definition by setting `workflow_completion_retention`.
213216
///
214217
/// ## Implementing workflows
@@ -265,7 +268,7 @@ pub use restate_sdk_macros::object;
265268
///
266269
/// Every workflow needs a `run` handler.
267270
/// This handler has access to the same SDK features as Service and Virtual Object handlers.
268-
/// In the example above, we use [`ctx.run`][journaling_results] to log the sending of the email in Restate and avoid re-execution on replay.
271+
/// In the example above, we use [`ctx.run`][crate::context::ContextSideEffects] to log the sending of the email in Restate and avoid re-execution on replay.
269272
///
270273
///
271274
/// ## Shared handlers
@@ -274,7 +277,7 @@ pub use restate_sdk_macros::object;
274277
///
275278
/// ### Querying workflows
276279
///
277-
/// Similar to Virtual Objects, you can retrieve the [K/V state][state] of workflows via the other handlers defined in the workflow definition,
280+
/// Similar to Virtual Objects, you can retrieve the [K/V state][crate::context::ContextReadState] of workflows via the other handlers defined in the workflow definition,
278281
/// In the example we expose the status of the workflow to external clients.
279282
/// Every workflow execution can be seen as a new object, so the state is isolated to a single workflow execution.
280283
/// The state can only be mutated by the `run` handler of the workflow. The other handlers can only read the state.
@@ -294,18 +297,18 @@ pub use restate_sdk_macros::object;
294297
///
295298
/// ### Serving and registering workflows
296299
///
297-
/// You serve workflows in the same way as Services and Virtual Objects. Have a look at the [Serving docs][serving].
300+
/// You serve workflows in the same way as Services and Virtual Objects. Have a look at the [Serving docs][crate::http_server].
298301
/// Make sure you [register the endpoint or Lambda handler](https://docs.restate.dev/operate/registration) in Restate before invoking it.
299302
///
300303
/// **Tip: Workflows-as-code with Restate**:
301304
/// [Check out some examples of workflows-as-code with Restate on the use case page](https://docs.restate.dev/use-cases/workflows).
302305
///
303306
///
304307
/// ## Submitting workflows from a Restate service
305-
/// [**Submit/query/signal**][service_communication]:
308+
/// [**Submit/query/signal**][crate::context::ContextClient]:
306309
/// Call the workflow handlers in the same way as for Services and Virtual Objects.
307310
/// You can only call the `run` handler (submit) once per workflow ID (here `"someone"`).
308-
/// Check out the [Service Communication docs][service_communication] for more information.
311+
/// Check out the [Service Communication docs][crate::context::ContextClient] for more information.
309312
///
310313
/// ## Submitting workflows over HTTP
311314
/// [**Submit/query/signal**](https://docs.restate.dev/invoke/http#request-response-calls-over-http):

0 commit comments

Comments
 (0)