benthos/examples

[benthos] example1 (POST input, stdout output)

justbagmeg 2022. 8. 27. 16:51

config.yaml

# Common config fields, showing default values
input:
  label: ""
  http_server:
    address: "0.0.0.0:30000"
    path: /post
    allowed_verbs:
      - POST
    timeout: 5s

pipeline:
  processors: []

output:
  label: ""
  stdout:
    codec: lines

run benthos with config.yaml

benthos -c <path/to/config.yaml>

send POST request

curl -XPOST http://127.0.0.1:30000/post -H 'Content-Type: application/json' -d '{"foo":"bar"}'

input으로 받은 데이터가 stdout으로 나오는 걸 확인할 수 있다.

'benthos > examples' 카테고리의 다른 글

[benthos] example2 - elasticsearch output  (0) 2022.09.04