GetCurrentDBMapping returns current cached db mapping.
()
| 73 | |
| 74 | // GetCurrentDBMapping returns current cached db mapping. |
| 75 | func (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 | |
| 85 | func (bs *BusService) updateState(count uint32, profiles []*types.SQLChainProfile) { |
| 86 | bs.lock.Lock() |
no outgoing calls