Init initializes the posting lists package, the in memory and dirty list hash.
(ps *badger.DB, cacheSize int64, removeOnUpdate bool)
| 35 | |
| 36 | // Init initializes the posting lists package, the in memory and dirty list hash. |
| 37 | func Init(ps *badger.DB, cacheSize int64, removeOnUpdate bool) { |
| 38 | pstore = ps |
| 39 | closer = z.NewCloser(1) |
| 40 | go x.MonitorMemoryMetrics(closer) |
| 41 | |
| 42 | MemLayerInstance = initMemoryLayer(cacheSize, removeOnUpdate) |
| 43 | } |
| 44 | |
| 45 | func SetEnabledDetailedMetrics(enableMetrics bool) { |
| 46 | EnableDetailedMetrics = enableMetrics |