@@ -199,55 +199,55 @@ func ReadTombstones(dir string) (TombstoneReader, int64, error) {
199199 return stonesMap , int64 (len (b )), nil
200200}
201201
202- type MemTombstones struct {
203- IntvlGroups map [uint64 ]Intervals
202+ type memTombstones struct {
203+ intvlGroups map [uint64 ]Intervals
204204 mtx sync.RWMutex
205205}
206206
207207// NewMemTombstones creates new in memory TombstoneReader
208208// that allows adding new intervals.
209- func NewMemTombstones () * MemTombstones {
210- return & MemTombstones { IntvlGroups : make (map [uint64 ]Intervals )}
209+ func NewMemTombstones () * memTombstones {
210+ return & memTombstones { intvlGroups : make (map [uint64 ]Intervals )}
211211}
212212
213- func (t * MemTombstones ) Get (ref uint64 ) (Intervals , error ) {
213+ func (t * memTombstones ) Get (ref uint64 ) (Intervals , error ) {
214214 t .mtx .RLock ()
215215 defer t .mtx .RUnlock ()
216- return t .IntvlGroups [ref ], nil
216+ return t .intvlGroups [ref ], nil
217217}
218218
219- func (t * MemTombstones ) Iter (f func (uint64 , Intervals ) error ) error {
219+ func (t * memTombstones ) Iter (f func (uint64 , Intervals ) error ) error {
220220 t .mtx .RLock ()
221221 defer t .mtx .RUnlock ()
222- for ref , ivs := range t .IntvlGroups {
222+ for ref , ivs := range t .intvlGroups {
223223 if err := f (ref , ivs ); err != nil {
224224 return err
225225 }
226226 }
227227 return nil
228228}
229229
230- func (t * MemTombstones ) Total () uint64 {
230+ func (t * memTombstones ) Total () uint64 {
231231 t .mtx .RLock ()
232232 defer t .mtx .RUnlock ()
233233
234234 total := uint64 (0 )
235- for _ , ivs := range t .IntvlGroups {
235+ for _ , ivs := range t .intvlGroups {
236236 total += uint64 (len (ivs ))
237237 }
238238 return total
239239}
240240
241241// AddInterval to an existing MemTombstones
242- func (t * MemTombstones ) AddInterval (ref uint64 , itvs ... Interval ) {
242+ func (t * memTombstones ) AddInterval (ref uint64 , itvs ... Interval ) {
243243 t .mtx .Lock ()
244244 defer t .mtx .Unlock ()
245245 for _ , itv := range itvs {
246- t .IntvlGroups [ref ] = t .IntvlGroups [ref ].Add (itv )
246+ t .intvlGroups [ref ] = t .intvlGroups [ref ].Add (itv )
247247 }
248248}
249249
250- func (* MemTombstones ) Close () error {
250+ func (* memTombstones ) Close () error {
251251 return nil
252252}
253253
0 commit comments