Skip to content

Commit

Permalink
fix: make README compile
Browse files Browse the repository at this point in the history
  • Loading branch information
sacha-l committed Dec 13, 2024
1 parent bfe94cb commit 69cb4fd
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -262,6 +262,7 @@ Here’s how you can set up and use SwarmNL's replication capabilities:
#### Configuring a Node for Replication

```rust
#![cfg_attr(not(doctest))]
//! Configure the node for replication with a strong consistency model

// Define the replica network ID
Expand Down Expand Up @@ -291,6 +292,7 @@ Here’s how you can set up and use SwarmNL's replication capabilities:
SwarmNL exposes network events to your application, allowing you to process incoming replica data effectively.

```rust
#![cfg_attr(not(doctest))]
// Listen for replication events
loop {
// Check for incoming data events
Expand Down Expand Up @@ -336,7 +338,7 @@ Here’s how you can set up and use SwarmNL's sharding capabilities:
#### Configuring a node for sharding

```rust

#![cfg_attr(not(doctest))]
//! Configure a node for sharding operations

/// The constant id of the sharded network. Should be kept as a secret.
Expand Down Expand Up @@ -429,6 +431,7 @@ Here’s how you can set up and use SwarmNL's sharding capabilities:
#### Choosing a sharding algorithm and storing data on the network

```rust
#![cfg_attr(not(doctest))]
//! Select a sharding algorithm and assign nodes to their respective shards

// Initialize the hash-based sharding policy
Expand Down Expand Up @@ -489,6 +492,7 @@ Here’s how you can set up and use SwarmNL's sharding capabilities:
A node can receive data either through forwarding from a node in another shard or via replication from a peer node in the same shard. Below is an example demonstrating how to listen for and handle both types of events.

```rust
#![cfg_attr(not(doctest))]
loop {
// Check for incoming data events
if let Some(event) = node.next_event().await {
Expand Down

0 comments on commit 69cb4fd

Please sign in to comment.