2019-04-19 12:43:36 +08:00
|
|
|
package needle_map
|
2017-05-27 13:51:25 +08:00
|
|
|
|
2018-07-08 17:28:04 +08:00
|
|
|
import (
|
2022-07-29 15:17:28 +08:00
|
|
|
. "github.com/seaweedfs/seaweedfs/weed/storage/types"
|
2018-07-08 17:28:04 +08:00
|
|
|
)
|
|
|
|
|
2017-05-27 13:51:25 +08:00
|
|
|
type NeedleValueMap interface {
|
2020-08-19 08:04:28 +08:00
|
|
|
Set(key NeedleId, offset Offset, size Size) (oldOffset Offset, oldSize Size)
|
|
|
|
Delete(key NeedleId) Size
|
2018-07-08 17:28:04 +08:00
|
|
|
Get(key NeedleId) (*NeedleValue, bool)
|
2019-05-19 13:46:24 +08:00
|
|
|
AscendingVisit(visit func(NeedleValue) error) error
|
2017-05-27 13:51:25 +08:00
|
|
|
}
|