cloudevents is a tool for testing CloudEvents receivers.
Work in progress.
cloudevents can be installed via:
go get github.com/cloudevents/conformance/cmd/cloudeventsTo update your installation:
go get -u github.com/cloudevents/conformance/cmd/cloudeventscloudevents has three commands at the moment: send, invoke and listen.
send will do a one-off creation of a cloudevent and send to a given target.
cloudevents send http://localhost:8080 --id abc-123 --source cloudevents.conformance.tool --type foo.barinvoke will read yaml files, convert them to http and send them to the given
target.
cloudevents invoke http://localhost:8080 -f ./yaml/v0.3listen will accept http request and write the converted yaml to stdout.
cloudevents listen -v > got.yamlOptionally, you can forward the incoming request to a target.
cloudevents listen -v -t http://localhost:8181 > got.yamlIf you would like to produce a pre-produced event yaml file, you can use
listen to collect requests. This works with both running event producers that
can be directed at the listen port or directly with send.
Feature requests:
- Add a
yamlcommand that allows the same format of send but direct to yaml. - Add a
--yamlflag tosendthat outputs what the definition of the sent event would look like in yaml. - Add
-f -support for reading from STDIN as the file for yaml, this allows forsend|invokechaining. - Add format support to
sendto select binary or structured.