From 33e4c70e3bec59de0667285b86ac92cce5d93dbc Mon Sep 17 00:00:00 2001 From: Andras Toth <4157749+tothandras@users.noreply.github.com> Date: Sun, 14 Jan 2024 20:09:16 +0100 Subject: [PATCH] docs(examples): small fixes --- examples/http-server/README.md | 7 +++---- examples/http-server/seed/batch.json | 3 --- examples/http-server/seed/event.json | 1 - examples/kubernetes-pod-exec-time/README.md | 3 +-- 4 files changed, 4 insertions(+), 10 deletions(-) diff --git a/examples/http-server/README.md b/examples/http-server/README.md index d822710..1bb05c2 100644 --- a/examples/http-server/README.md +++ b/examples/http-server/README.md @@ -7,10 +7,9 @@ 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) +- [Checking events](#checking-events) - [Cleanup](#cleanup) - [Advanced configuration](#advanced-configuration) - [Production use](#production-use) @@ -67,7 +66,7 @@ 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._ @@ -75,7 +74,7 @@ _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._ diff --git a/examples/http-server/seed/batch.json b/examples/http-server/seed/batch.json index c58789c..3f4e257 100644 --- a/examples/http-server/seed/batch.json +++ b/examples/http-server/seed/batch.json @@ -5,7 +5,6 @@ "type": "api-calls", "source": "api-gateway", "subject": "customer-1", - "time": "2024-01-09T13:06:04.715Z", "data": { "method": "POST", "path": "/", @@ -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", @@ -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", diff --git a/examples/http-server/seed/event.json b/examples/http-server/seed/event.json index 99f0af0..68c54af 100644 --- a/examples/http-server/seed/event.json +++ b/examples/http-server/seed/event.json @@ -4,7 +4,6 @@ "type": "api-calls", "source": "api-gateway", "subject": "customer-1", - "time": "2024-01-09T13:05:04.715Z", "data": { "method": "POST", "path": "/", diff --git a/examples/kubernetes-pod-exec-time/README.md b/examples/kubernetes-pod-exec-time/README.md index 86ddf3f..1115e9a 100644 --- a/examples/kubernetes-pod-exec-time/README.md +++ b/examples/kubernetes-pod-exec-time/README.md @@ -2,11 +2,10 @@ This example demonstrates metering execution time of Pods running in Kubernetes. -## Table of Contents - - [Prerequisites](#prerequisites) - [Preparations](#preparations) - [Deploy the example](#deploy-the-example) +- [Checking events](#checking-events) - [Cleanup](#cleanup) - [Advanced configuration](#advanced-configuration) - [Production use](#production-use)