WIP: refactor/api #1

Draft
rob wants to merge 27 commits from refactor/api into main
Showing only changes of commit d0d96dd1d9 - Show all commits

View File

@ -64,14 +64,15 @@ func (a *App) Run(ctx context.Context) error {
return fmt.Errorf("receive envelope: %w", recErr) return fmt.Errorf("receive envelope: %w", recErr)
} }
evt := envelope.GetEvent() pbEvt := envelope.GetEvent()
if evt == nil { if pbEvt == nil {
a.logger.Error("Received envelope without event") a.logger.Error("Received envelope without event")
continue continue
} }
a.logger.Debug("Received event") evt := protocol.EventFromProto(pbEvt)
a.bus.Send(protocol.EventFromProto(evt)) a.logger.Debug("Received event from gRPC stream", "event", evt)
a.bus.Send(evt)
} }
}) })