Skip to content

Commit

Permalink
Merge pull request #81 from Savid/fix-blob-sidecar-http
Browse files Browse the repository at this point in the history
add blob_sidecar http handler
  • Loading branch information
mcdee authored Oct 12, 2023
2 parents 7368130 + d018578 commit 0eff364
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions http/events.go
Original file line number Diff line number Diff line change
Expand Up @@ -167,6 +167,14 @@ func (s *Service) handleEvent(ctx context.Context, msg *sse.Event, handler clien
return
}
event.Data = payloadAttributesEvent
case "blob_sidecar":
blobSidecar := &api.BlobSidecarEvent{}
err := json.Unmarshal(msg.Data, blobSidecar)
if err != nil {
log.Error().Err(err).RawJSON("data", msg.Data).Msg("Failed to parse blob sidecar event")
return
}
event.Data = blobSidecar
case "":
// Used as keepalive. Ignore.
return
Expand Down

0 comments on commit 0eff364

Please sign in to comment.