-
Notifications
You must be signed in to change notification settings - Fork 70
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into chore/update-pallas-v027
- Loading branch information
Showing
9 changed files
with
254 additions
and
26 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,7 @@ | ||
name: Testdrive | ||
|
||
on: | ||
workflow_dispatch: {} | ||
push: | ||
branches: | ||
- testdrive | ||
|
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
# Redis cursor | ||
|
||
This example shows you how to persits the cursor information on a Redis cluster. | ||
|
||
The `daemon.toml` includes the `[cursor]` section that has `type` set to `Redis`, `key` is the key on the redis cluster where to dump the information, and `url` the connection string to connect with Redis. | ||
|
||
To run the example: | ||
|
||
* Set up [Demeter CLI](https://docs.demeter.run/cli). | ||
* On a different terminal but same path run `dmtr ports tunnel`. | ||
Chose the `node` option, followed by the `preprod` network and the `stable` version. Finally, mount the socket on `./socket`. | ||
* `docker compose up -d` to spin up the Redis instance. | ||
* ```sh | ||
cargo run --bin oura --features redis daemon --config daemon.toml | ||
``` | ||
|
||
In order to see cursor information on the Redis you can do the following. | ||
|
||
```sh | ||
$ docker exec -it redis redis-cli | ||
127.0.0.1:6379> GET key | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
[source] | ||
type = "N2C" | ||
socket_path = "./socket" | ||
|
||
[intersect] | ||
type = "Origin" | ||
|
||
[chain] | ||
type = "preprod" | ||
|
||
[cursor] | ||
type = "Redis" | ||
key = "key" | ||
url = "redis://localhost:6379" | ||
flush_interval = 1 | ||
|
||
[sink] | ||
type = "Stdout" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
version: "3" | ||
services: | ||
redis: | ||
image: redis | ||
container_name: redis | ||
ports: | ||
- "6379:6379" | ||
networks: | ||
- redis-network | ||
healthcheck: | ||
test: ["CMD", "redis-cli", "ping"] | ||
interval: 5s | ||
timeout: 5s | ||
retries: 5 | ||
|
||
networks: | ||
redis-network: | ||
driver: bridge |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.