implement cluster replication

todo: need to add chain of senders in a header to a header to prevent unnecessary sends
This commit is contained in:
2025-07-31 15:55:07 +01:00
parent 6935575654
commit c62d685fa4
18 changed files with 312 additions and 109 deletions

View File

@@ -39,6 +39,7 @@ type Server struct {
listeners *publish.S
*config.C
*Lists
*Peers
Mux *servemux.S
}
@@ -102,7 +103,11 @@ func NewServer(
options: op,
C: sp.C,
Lists: new(Lists),
Peers: new(Peers),
}
chk.E(
s.Peers.Init(sp.C.PeerRelays, sp.C.RelaySecret),
)
s.listeners = publish.New(socketapi.New(s), openapi.NewPublisher(s))
go func() {
if err := s.relay.Init(); chk.E(err) {