MCPcopy Index your code
hub / github.com/CovenantSQL/CovenantSQL / GetCurrentDBMapping

Method GetCurrentDBMapping

worker/chainbusservice.go:75–83  ·  view source on GitHub ↗

GetCurrentDBMapping returns current cached db mapping.

()

Source from the content-addressed store, hash-verified

73
74// GetCurrentDBMapping returns current cached db mapping.
75func (bs *BusService) GetCurrentDBMapping() (dbMap map[proto.DatabaseID]*types.SQLChainProfile) {
76 dbMap = make(map[proto.DatabaseID]*types.SQLChainProfile)
77 bs.lock.RLock()
78 defer bs.lock.RUnlock()
79 for k, v := range bs.sqlChainProfiles {
80 dbMap[k] = v
81 }
82 return
83}
84
85func (bs *BusService) updateState(count uint32, profiles []*types.SQLChainProfile) {
86 bs.lock.Lock()

Callers 2

TestNewBusServiceFunction · 0.95
InitMethod · 0.80

Calls

no outgoing calls

Tested by 1

TestNewBusServiceFunction · 0.76