Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 12 additions & 6 deletions docs/v2/advanced/stateful_cursor.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -25,16 +25,19 @@ and resumes the source from there.
Add a top-level `[cursor]` section to enable the feature, and pick a backend with `type`:

<Tabs syncKey="cursor-backend">
<TabItem label="Memory">
<TabItem label="Memory">

Keeps the cursor in memory only — the position is **not** persisted across restarts. This is
the default when no `[cursor]` section is present, and takes no extra fields.

```toml title="daemon.toml"
[cursor]
type = "Memory"
```
</TabItem>
<TabItem label="File">

</TabItem>
<TabItem label="File">

Stores the cursor in a JSON file on the local file system.

```toml title="daemon.toml"
Expand All @@ -51,8 +54,10 @@ flush_interval = 10
recover across rollbacks.
- `flush_interval` (optional, default = `10`): how often, in seconds, the position is written
to disk.
</TabItem>
<TabItem label="Redis">

</TabItem>
<TabItem label="Redis">

Stores the cursor in a Redis instance — handy when running multiple environments or ephemeral
containers.

Expand All @@ -70,5 +75,6 @@ flush_interval = 10
- `max_breadcrumbs` (optional, default = `10`): how many recent positions to retain.
- `flush_interval` (optional, default = `10`): how often, in seconds, the position is flushed
to Redis.
</TabItem>

</TabItem>
</Tabs>
6 changes: 3 additions & 3 deletions docs/v2/how_it_works.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,11 @@ batches.

```mermaid
flowchart LR
node([Cardano node]) -->|Ouroboros mini-protocols| source[Source]
cnode([Cardano node]) -->|Ouroboros mini-protocols| source[Source]
source --> f1[Filter] --> f2[Filter] --> sink[Sink]
sink --> dest([Destination])
sink -.reports position.-> cursor[(Cursor)]
cursor -.restores on restart.-> source
sink -. reports position .-> cursor[(Cursor)]
cursor -. restores on restart .-> source
```

## The pipeline
Expand Down
Loading