mesh/merge-gate pass: builds build-agent, mesh-controller, route-proxy → ace, g14, novox, shanks; no bus step; every machine composes with the change as it…
mesh/repo-check pass: its merge-check.sh passed
mesh/delivery delivered
mesh/delivery-group group fix/330-a-message-given-up-on-is-kept delivered: every member is delivered
A dead letter was let go as delivered even when its consumer did not filter its again subject; seat asks needed a grant over every seat's queue and left the original stuck; a notices bind failure stopped the controller (review).
27 lines
955 B
Go
27 lines
955 B
Go
package link
|
|
|
|
import (
|
|
"github.com/novox/mesh-controller/internal/broker"
|
|
)
|
|
|
|
// ConnectNats is Connect for the bus being built: the controller's inbound and outbound over one
|
|
// JetStream connection the caller has already raised the streams on. Nothing is declared here —
|
|
// the streams and the controller's consumers are asserted by Raise, before anything is served.
|
|
func ConnectNats(js *broker.JetStream, enroller Enroller, listener Listener) *Server {
|
|
logger := newLog()
|
|
inbound := Nats(js).(*natsInbound)
|
|
inbound.log = logger
|
|
return &Server{
|
|
inbound: inbound,
|
|
bus: OverNATS{JS: js.Context(), Conn: js.Conn()},
|
|
js: js,
|
|
enroller: enroller,
|
|
listener: listener,
|
|
log: logger,
|
|
}
|
|
}
|
|
|
|
// Bus is the controller's outbound, whichever transport it connected over. Callers that send a
|
|
// declaration or ask a tool use this rather than the channel, which one transport does not have.
|
|
func (s *Server) Bus() Bus { return s.bus }
|