pass in option to read deleted entries

not working yet
This commit is contained in:
Chris Lu
2020-08-18 17:37:26 -07:00
parent 51ecb49db3
commit 7e91ae592c
7 changed files with 18 additions and 8 deletions

View File

@@ -23,6 +23,10 @@ const (
MAX_TTL_VOLUME_REMOVAL_DELAY = 10 // 10 minutes
)
type ReadOption struct {
ReadDeleted bool
}
/*
* A VolumeServer contains one Store
*/
@@ -283,9 +287,9 @@ func (s *Store) DeleteVolumeNeedle(i needle.VolumeId, n *needle.Needle) (Size, e
return 0, fmt.Errorf("volume %d not found on %s:%d", i, s.Ip, s.Port)
}
func (s *Store) ReadVolumeNeedle(i needle.VolumeId, n *needle.Needle) (int, error) {
func (s *Store) ReadVolumeNeedle(i needle.VolumeId, n *needle.Needle, readOption *ReadOption) (int, error) {
if v := s.findVolume(i); v != nil {
return v.readNeedle(n)
return v.readNeedle(n, readOption)
}
return 0, fmt.Errorf("volume %d not found", i)
}