Skip to content

Latest commit

 

History

History
34 lines (26 loc) · 1.1 KB

periodic-producer.md

File metadata and controls

34 lines (26 loc) · 1.1 KB

periodic producer

configuration

Name Default Description
VERBOSE true if true you get an extensive log output
CE_TEMPLATE {"name": "Alex"} example valid json
CE_SOURCE https://github.com/alitari/ce-go-template Cloudevent Source
CE_TYPE com.github.alitari.ce-go-template.periodic-producer Cloudevent Type
K_SINK An adressable K8s resource. see Sinkbinding
PERIOD 1000ms frequency of sending events
TIMEOUT 1000ms send timeout

examples

default

K_SINK=https://httpbin.org/post go run cmd/periodic-producer/main.go

producing random CloudEvents

CE_TEMPLATE='{{ $rand :=  randNumeric 1 | atoi }}'\
'{ {{ if gt $rand 5 }}'\
'"foo": "foovalue"'\
'{{ else }}'\
'"bar": "barvalue"'\
'{{ end }} }' \
K_SINK=https://httpbin.org/post go run cmd/periodic-producer/main.go