lni / dragonboat

A feature complete and high performance multi-group Raft library in Go.
Apache License 2.0
4.98k stars 533 forks source link

[HELP] libp2p #302

Closed asynxc closed 1 year ago

asynxc commented 1 year ago

Hello ! kudos for this awsome project.

I'm trying to add dragonboat/raft into my existing project that uses go libp2p library to manager its network layer (with dynamic discovery). Looking at the api of this project, seems to me that there's no "easy" way to passthrough a ready made tcp conn when ever necessary without reimplimenting the whole TCP transport layer. Or m'i missing somthing ?

Thanks again for this awsome project !

asynxc commented 1 year ago

digging in the source code, i understood more how things work for the transport part, i simply need to implement a custom ITransport and swap it in with custom TransportFactory

lni commented 1 year ago

i simply need to implement a custom ITransport and swap it in with custom TransportFactory

Yes.

Please note that reliable & ordered message delivery are not required. There is no such requirement for the library. It is totally fine to drop some messages & have some of them delivered out of order.