Correct logic on passing to handler
This commit is contained in:
parent
cab491f0d9
commit
e29cb4b5a2
@ -23,6 +23,7 @@ func asCustodialRegistrationEvent(gev *geEvent.Event) (*eventCustodialRegistrati
|
|||||||
if !ok {
|
if !ok {
|
||||||
return nil, false
|
return nil, false
|
||||||
}
|
}
|
||||||
|
logg.Debug("parsed ev", "pl", pl, "ev", ev)
|
||||||
return &ev, true
|
return &ev, true
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -19,7 +19,7 @@ var (
|
|||||||
)
|
)
|
||||||
|
|
||||||
type NatsSubscription struct {
|
type NatsSubscription struct {
|
||||||
*event.Router
|
event.Router
|
||||||
ctx context.Context
|
ctx context.Context
|
||||||
conn *nats.Conn
|
conn *nats.Conn
|
||||||
js jetstream.JetStream
|
js jetstream.JetStream
|
||||||
|
@ -23,7 +23,7 @@ type Router struct {
|
|||||||
func(r *Router) Route(gev *geEvent.Event) error {
|
func(r *Router) Route(gev *geEvent.Event) error {
|
||||||
logg.Debug("have event", "ev", gev)
|
logg.Debug("have event", "ev", gev)
|
||||||
evCC, ok := asCustodialRegistrationEvent(gev)
|
evCC, ok := asCustodialRegistrationEvent(gev)
|
||||||
if !ok {
|
if ok {
|
||||||
return handleCustodialRegistration(evCC)
|
return handleCustodialRegistration(evCC)
|
||||||
}
|
}
|
||||||
return fmt.Errorf("unexpected message")
|
return fmt.Errorf("unexpected message")
|
||||||
|
Loading…
Reference in New Issue
Block a user