Documentation ¶
Index ¶
Constants ¶
View Source
const ( DefaultSFCapacity = 1e6 // FalsePositiveRate DefaultSFFPR = 1e-6 DefaultSFSlot = 10 )
Those suggest value are all set according to https://github.com/shadowsocks/shadowsocks-org/issues/44#issuecomment-281021054 Due to this package contains various internal implementation so const named with DefaultBR prefix
Variables ¶
View Source
var ( SnapshotIsPerformingError = errors.New("another snapshot is performing") DamagedSnapshotError = errors.New("the snapshot is damaged") )
Functions ¶
This section is empty.
Types ¶
type AppendFsync ¶
type AppendFsync int
const ( AppendFsyncAlways AppendFsync = iota AppendFsyncEverySec AppendFsyncNo )
type PBF ¶
type PBF struct {
// contains filtered or unexported fields
}
PBF is mainly with reference to the mechanism of AOF (Append Only File) of redis.
func NewFromFile ¶
func NewFromFile(path string, fsync AppendFsync) (*PBF, error)
NewFromFile will try recovering from file
Click to show internal directories.
Click to hide internal directories.