Advertisement
noC0d3

Kafka Request Body

Feb 19th, 2020
397
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Go 0.35 KB | None | 0 0
  1. payload, err := json.Marshal(&r.Body)
  2. if err != nil {
  3.     p.logger.ErrorWithContext(r.Context(), err)
  4.     w.Commit(kafkalib.StatusFailedPrecondition)
  5.     return
  6. }
  7.  
  8. if err := p.uc.EventStore.ProcessEventStore(r.Context(), string(payload[:])); err != nil {
  9.     p.logger.ErrorWithContext(r.Context(), err)
  10.     w.Commit(kafkalib.StatusFailedPrecondition)
  11.     return
  12. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement