Skip to content
This repository has been archived by the owner on Mar 13, 2024. It is now read-only.

Commit

Permalink
docs(examples): small fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
tothandras committed Jan 14, 2024
1 parent 47e967e commit bdc93b5
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 12 deletions.
8 changes: 3 additions & 5 deletions examples/http-server/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,6 @@ The nice thing about this solution is that you can use it as a drop-in replaceme
This means you can use our existing SDKs; the only thing you need to change is the API endpoint.
That is, of course, optional: you can use any client library or payload format you prefer and handle the mapping to the [CloudEvents](https://cloudevents.io/) format in a Benthos [`mapping` processor](https://www.benthos.dev/docs/components/processors/mapping/).

## Table of Contents

- [Prerequisites](#prerequisites)
- [Launch the example](#launch-the-example)
- [Cleanup](#cleanup)
Expand All @@ -22,7 +20,7 @@ Check out this repository if you want to run the example locally:

```shell
git clone https://github.com/openmeterio/benthos-openmeter.git
cd benthos-openmeter/examples/http_server
cd benthos-openmeter/examples/http-server
```

Create a new `.env` file and add the details of your OpenMeter instance:
Expand Down Expand Up @@ -52,15 +50,15 @@ docker compose logs -f forwarder
Open another terminal and send a test event:

```shell
curl -vvv http://localhost:4196/api/v1/events -H "Content-Type: application/cloudevents+json" -d @seed/event.json
curl -vvv http://127.0.0.1:4196/api/v1/events -H "Content-Type: application/cloudevents+json" -d @seed/event.json
```

_Inspect the logs in the other terminal._

Send a batch of events:

```shell
curl -vvv http://localhost:4196/api/v1/events -H "Content-Type: application/cloudevents-batch+json" -d @seed/batch.json
curl -vvv http://127.0.0.1:4196/api/v1/events -H "Content-Type: application/cloudevents-batch+json" -d @seed/batch.json
```

_Inspect the logs in the other terminal._
Expand Down
3 changes: 0 additions & 3 deletions examples/http-server/seed/batch.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
"type": "api-calls",
"source": "api-gateway",
"subject": "customer-1",
"time": "2024-01-09T13:06:04.715Z",
"data": {
"method": "POST",
"path": "/",
Expand All @@ -20,7 +19,6 @@
"type": "api-calls",
"source": "api-gateway",
"subject": "customer-2",
"time": "2024-01-09T13:07:04.715Z",
"data": {
"method": "GET",
"path": "/contact",
Expand All @@ -35,7 +33,6 @@
"type": "api-calls",
"source": "api-gateway",
"subject": "customer-3",
"time": "2024-01-09T13:08:04.715Z",
"data": {
"method": "GET",
"path": "/home",
Expand Down
1 change: 0 additions & 1 deletion examples/http-server/seed/event.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
"type": "api-calls",
"source": "api-gateway",
"subject": "customer-1",
"time": "2024-01-09T13:05:04.715Z",
"data": {
"method": "POST",
"path": "/",
Expand Down
3 changes: 0 additions & 3 deletions examples/kubernetes-pod-exec-time/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@

This example demonstrates metering execution time of Pods running in Kubernetes.

## Table of Contents

- [Prerequisites](#prerequisites)
- [Preparations](#preparations)
- [Deploy the example](#deploy-the-example)
Expand Down Expand Up @@ -49,7 +47,6 @@ helm install --wait --namespace benthos --create-namespace --set preset=kubernet
> [!NOTE]
> If you use OpenMeter Cloud, you can omit the `openmeter.url` parameter.

## Cleanup

Uninstall Benthos from the cluster:
Expand Down

0 comments on commit bdc93b5

Please sign in to comment.