Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/cali0707/func-invoke-confusion
https://github.com/cali0707/func-invoke-confusion
Last synced: about 1 month ago
JSON representation
- Host: GitHub
- URL: https://github.com/cali0707/func-invoke-confusion
- Owner: Cali0707
- Created: 2024-03-20T20:55:36.000Z (8 months ago)
- Default Branch: main
- Last Pushed: 2024-03-20T20:55:46.000Z (8 months ago)
- Last Synced: 2024-04-18T01:59:02.737Z (7 months ago)
- Language: Go
- Size: 3.91 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Go Cloud Events Function
Welcome to your new Go Function! The boilerplate function code can be found in [`handle.go`](handle.go). This Function is meant to respond exclusively to [Cloud Events](https://cloudevents.io/), but you can remove the check for this in the function and it will respond just fine to plain vanilla incoming HTTP requests.
## Development
Develop new features by adding a test to [`handle_test.go`](handle_test.go) for each feature, and confirm it works with `go test`.
Update the running analog of the function using the `func` CLI or client library, and it can be invoked using a manually-created CloudEvent:
```console
curl -v -X POST -d '{"message": "hello"}' \
-H'Content-type: application/json' \
-H'Ce-id: 1' \
-H'Ce-source: cloud-event-example' \
-H'Ce-subject: Echo content' \
-H'Ce-type: MyEvent' \
-H'Ce-specversion: 1.0' \
http://localhost:8080/
```For more, see [the complete documentation]('https://github.com/knative/func/tree/main/docs')