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

Function broadcast

IceFireDB-SQLProxy/internal/mysql/p2p.go:177–189  ·  view source on GitHub ↗
(sql string, accessType string)

Source from the content-addressed store, hash-verified

175}
176
177func broadcast(sql string, accessType string) {
178 if !isDML(sql) {
179 return
180 }
181
182 if accessType == "admin" {
183 p2pChans.adminPubSub.Outbound <- sql
184 logrus.Infof("Outbound admin sql: %s", sql)
185 } else {
186 // Readonly nodes don't broadcast writes
187 logrus.Infof("Readonly node attempted to broadcast write: %s", sql)
188 }
189}

Callers 2

HandleQueryMethod · 0.85
HandleStmtExecuteMethod · 0.85

Calls 1

isDMLFunction · 0.70

Tested by

no test coverage detected