Skip to content

Instantly share code, notes, and snippets.

@mattfysh
Last active August 22, 2023 01:00
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mattfysh/4497818c85b373464c5bc72216ffc2b2 to your computer and use it in GitHub Desktop.
Save mattfysh/4497818c85b373464c5bc72216ffc2b2 to your computer and use it in GitHub Desktop.
Benthos + Consul
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