diff options
| author | Baitinq <[email protected]> | 2024-05-27 18:45:50 +0200 |
|---|---|---|
| committer | Baitinq <[email protected]> | 2024-05-27 20:06:12 +0200 |
| commit | 951675d62f631df7ccaca7c22de004d9576d3e91 (patch) | |
| tree | 7fe41a57991009c4f5dbe2d5aa62f5667ae2255f /src/rest-api | |
| parent | misc: Create first Supabase migration (diff) | |
| download | fs-tracer-backend-951675d62f631df7ccaca7c22de004d9576d3e91.tar.gz fs-tracer-backend-951675d62f631df7ccaca7c22de004d9576d3e91.tar.bz2 fs-tracer-backend-951675d62f631df7ccaca7c22de004d9576d3e91.zip | |
payload-processor: insert to the file table
Diffstat (limited to 'src/rest-api')
| -rw-r--r-- | src/rest-api/handler/handler.go | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/src/rest-api/handler/handler.go b/src/rest-api/handler/handler.go index 3454486..9e44612 100644 --- a/src/rest-api/handler/handler.go +++ b/src/rest-api/handler/handler.go @@ -27,14 +27,12 @@ func (h Handler) ServeHTTP(w http.ResponseWriter, r *http.Request) { log.Fatal(err) } - body := fmt.Sprint("Hello World!", r.RemoteAddr, string(bytes)) - ctx, cancel := context.WithTimeout(r.Context(), 5*time.Second) defer cancel() err = h.kafka_writer.WriteMessages(ctx, kafka.Message{ Key: []byte("key"), //TODO:This routes to a partition. We should probably route by agent UUID TODO: wont this negate having multiple topics - Value: []byte(body), + Value: bytes, }) if err != nil { log.Fatal(err) |