pub type EventPublisherFn<A> = fn(consumer: Consumer<OutputSlot<<A as Application>::Report, <A as Application>::QueryResponse>>, bind_addr: SocketAddr, authorized_keys: Arc<AuthorizedKeys>, shutdown: &AtomicBool, wait: WaitStrategy);Expand description
Body of the event-publisher thread: a free function with this exact
signature (the trading binary supplies
melin_server::event_publisher::run; the
skip-order-exec binary supplies nothing). Passing it as a function
pointer keeps the runtime decoupled from the trading domain — no
melin_server::* reference inside server.rs — without paying for a
boxed closure.
Threaded into run (and run_dpdk under feature = "dpdk") as Option<EventPublisherFn>:
None disables the publisher unconditionally, Some(_) wires it up
when --event-bind is also set.