Last active
August 22, 2023 01:00
-
-
Save mattfysh/4497818c85b373464c5bc72216ffc2b2 to your computer and use it in GitHub Desktop.
Benthos + Consul
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
input: | |
sequence: | |
inputs: | |
- generate: | |
count: 1 | |
processors: | |
- http: | |
verb: GET | |
url: ${! env("CONSUL_ENDPOINT") }/v1/kv/${! env("CONSUL_KV_KEY") } | |
headers: | |
x-consul-token: ${! env("CONSUL_TOKEN") } | |
- mapping: | | |
root = { | |
"stdout": {}, | |
"processors": { | |
"redis": { | |
"url": json("0.Value").decode("base64").string(), | |
"command": "mset" | |
} | |
} | |
} | |
- http: | |
verb: POST | |
url: http://localhost:4195/outputs/x | |
- mapping: root = deleted() | |
- redis_streams: | |
url: ${RECORD_STREAMS_CONN} | |
streams: [records] | |
pipeline: | |
processors: [] # TODO | |
output: | |
dynamic: | |
outputs: {} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment