Bid Engine Order Processing Initiation
When the newOrder function within order.go is called in the previous step, an order struct is populated and then passed to the run method.
order := &order{
cfg: cfg,
orderID: oid,
session: session,
cluster: svc.cluster,
bus: svc.bus,
sub: sub,
log: log,
lc: lifecycle.New(),
reservationFulfilledNotify: reservationFulfilledNotify, // Normally nil in production
pass: pass,
}
...
// Run main loop in separate thread.
go order.run(checkForExistingBid)