Documentation ¶
Index ¶
- Variables
- func CleanupNodeDataDir(fs vfs.FS, dir string) error
- func CreateNodeDataDir(fs vfs.FS, dir string) error
- func DefaultOptions() *pebble.Options
- func GetCurrentDBDirName(fs vfs.FS, dir string) (string, error)
- func GetNewRandomDBDirName() string
- func GetNodeDBDirName(baseDir string, hostname string, name string) string
- func IsNewRun(fs vfs.FS, dir string) bool
- func OpenDB(dbdir string, options ...Option) (*pebble.DB, error)
- func ReplaceCurrentDBFile(fs vfs.FS, dir string) error
- func SaveCurrentDBDirName(fs vfs.FS, dir string, dbdir string) error
- func WriterOptions(level int) sstable.WriterOptions
- type Option
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrIsNotDir = errors.New("is not a dir")
Functions ¶
func CleanupNodeDataDir ¶
CleanupNodeDataDir cleans up old data dir (should be called after successful switch).
func CreateNodeDataDir ¶
CreateNodeDataDir creates new SM data dir.
func DefaultOptions ¶
func GetCurrentDBDirName ¶
GetCurrentDBDirName reads currentDBFilename file and return its contents.
func GetNewRandomDBDirName ¶
func GetNewRandomDBDirName() string
GetNewRandomDBDirName gets new random DB dir name.
func GetNodeDBDirName ¶
GetNodeDBDirName gets DB dir name prefix.
func ReplaceCurrentDBFile ¶
ReplaceCurrentDBFile does currentDBFilename switch (with fsync).
func SaveCurrentDBDirName ¶
SaveCurrentDBDirName saves DB name into updatingDBFilename (with fsync).
func WriterOptions ¶
func WriterOptions(level int) sstable.WriterOptions
Types ¶
type Option ¶
type Option interface {
// contains filtered or unexported methods
}
func WithEventListener ¶
func WithEventListener(listener pebble.EventListener) Option
func WithLogger ¶
func WithTableCache ¶ added in v0.2.0
func WithTableCache(cache *pebble.TableCache) Option
Click to show internal directories.
Click to hide internal directories.