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:
@@ -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]
|
||||
|
||||
Reference in New Issue
Block a user