MCPcopy Create free account
hub / github.com/IceFireDB/IceFireDB / connectP2PNetwork

Function connectP2PNetwork

IceFireDB-SQLProxy/internal/mysql/p2p.go:58–68  ·  view source on GitHub ↗
(host *p2p.P2P, mode string)

Source from the content-addressed store, hash-verified

56}
57
58func connectP2PNetwork(host *p2p.P2P, mode string) {
59 switch strings.ToLower(mode) {
60 case "announce":
61 host.AnnounceConnect()
62 case "advertise":
63 host.AdvertiseConnect()
64 default:
65 host.AdvertiseConnect()
66 }
67 logrus.Info("Connected to P2P network")
68}
69
70func asyncSQL(m *mysqlProxy) {
71 utils.GoWithRecover(func() {

Callers 1

initP2PFunction · 0.85

Calls 2

AnnounceConnectMethod · 0.45
AdvertiseConnectMethod · 0.45

Tested by

no test coverage detected