Skip to content

Commit

Permalink
add blob_sidecar http handler
Browse files Browse the repository at this point in the history
  • Loading branch information
Savid committed Oct 12, 2023
1 parent 7368130 commit d018578
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 d018578

Please sign in to comment.