1
0
mirror of https://github.com/jhillyerd/inbucket.git synced 2025-12-17 17:47:03 +00:00

storage: Make locking an implementation detail for #69

- file: Store handles its own locking #77
- file: Move mbox into its own file
- file & test: remove LockFor()
This commit is contained in:
James Hillyerd
2018-03-17 14:02:50 -07:00
parent b9003a9328
commit e84b1f8952
5 changed files with 288 additions and 292 deletions

View File

@@ -2,7 +2,6 @@ package test
import (
"errors"
"sync"
"github.com/jhillyerd/inbucket/pkg/storage"
)
@@ -82,12 +81,6 @@ func (s *StoreStub) VisitMailboxes(f func([]storage.StoreMessage) (cont bool)) e
return nil
}
// LockFor mock function returns a new RWMutex, never errors.
// TODO(#69) remove
func (s *StoreStub) LockFor(name string) (*sync.RWMutex, error) {
return &sync.RWMutex{}, nil
}
// MessageDeleted returns true if the specified message was deleted
func (s *StoreStub) MessageDeleted(m storage.StoreMessage) bool {
_, ok := s.deleted[m]