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 NewPebbleFS(fs gvfs.FS) pvfs.FS
- 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 ConcurrencyLimitScheduler
- func (s *ConcurrencyLimitScheduler) CumulativeStats(stats pebble.CompactionGrantHandleStats)
- func (s *ConcurrencyLimitScheduler) Done()
- func (s *ConcurrencyLimitScheduler) MeasureCPU(pebble.CompactionGoroutineKind)
- func (s *ConcurrencyLimitScheduler) Register(numGoroutinesPerCompaction int, db pebble.DBForCompaction)
- func (s *ConcurrencyLimitScheduler) Started()
- func (s *ConcurrencyLimitScheduler) TrySchedule() (bool, pebble.CompactionGrantHandle)
- func (s *ConcurrencyLimitScheduler) Unregister()
- func (s *ConcurrencyLimitScheduler) UpdateGetAllowedWithoutPermission()
- type FS
- func (p *FS) Create(name string, category pvfs.DiskWriteCategory) (pvfs.File, error)
- func (p *FS) GetDiskUsage(path string) (pvfs.DiskUsage, error)
- func (p *FS) Link(oldname, newname string) error
- func (p *FS) List(dir string) ([]string, error)
- func (p *FS) Lock(name string) (io.Closer, error)
- func (p *FS) MkdirAll(dir string, perm os.FileMode) error
- func (p *FS) Open(name string, opts ...pvfs.OpenOption) (pvfs.File, error)
- func (p *FS) OpenDir(name string) (pvfs.File, error)
- func (p *FS) OpenReadWrite(name string, category pvfs.DiskWriteCategory, opts ...pvfs.OpenOption) (pvfs.File, error)
- func (p *FS) PathBase(path string) string
- func (p *FS) PathDir(path string) string
- func (p *FS) PathJoin(elem ...string) string
- func (p *FS) Remove(name string) error
- func (p *FS) RemoveAll(name string) error
- func (p *FS) Rename(oldname, newname string) error
- func (p *FS) ReuseForWrite(oldname, newname string, category pvfs.DiskWriteCategory) (pvfs.File, error)
- func (p *FS) Stat(name string) (pvfs.FileInfo, error)
- func (p *FS) Unwrap() pvfs.FS
- 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 NewPebbleFS ¶
NewPebbleFS creates a new pebble/vfs.FS instance.
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 ConcurrencyLimitScheduler ¶
type ConcurrencyLimitScheduler struct {
// contains filtered or unexported fields
}
func NewConcurrencyLimitScheduler ¶
func NewConcurrencyLimitScheduler() *ConcurrencyLimitScheduler
func (*ConcurrencyLimitScheduler) CumulativeStats ¶
func (s *ConcurrencyLimitScheduler) CumulativeStats(stats pebble.CompactionGrantHandleStats)
func (*ConcurrencyLimitScheduler) Done ¶
func (s *ConcurrencyLimitScheduler) Done()
func (*ConcurrencyLimitScheduler) MeasureCPU ¶
func (s *ConcurrencyLimitScheduler) MeasureCPU(pebble.CompactionGoroutineKind)
func (*ConcurrencyLimitScheduler) Register ¶
func (s *ConcurrencyLimitScheduler) Register(numGoroutinesPerCompaction int, db pebble.DBForCompaction)
func (*ConcurrencyLimitScheduler) Started ¶
func (s *ConcurrencyLimitScheduler) Started()
func (*ConcurrencyLimitScheduler) TrySchedule ¶
func (s *ConcurrencyLimitScheduler) TrySchedule() (bool, pebble.CompactionGrantHandle)
func (*ConcurrencyLimitScheduler) Unregister ¶
func (s *ConcurrencyLimitScheduler) Unregister()
func (*ConcurrencyLimitScheduler) UpdateGetAllowedWithoutPermission ¶
func (s *ConcurrencyLimitScheduler) UpdateGetAllowedWithoutPermission()
type FS ¶
type FS struct {
// contains filtered or unexported fields
}
FS is a wrapper struct that implements the pebble/vfs.FS interface.
func (*FS) GetDiskUsage ¶
GetDiskUsage ...
func (*FS) OpenReadWrite ¶
func (p *FS) OpenReadWrite(name string, category pvfs.DiskWriteCategory, opts ...pvfs.OpenOption) (pvfs.File, error)
func (*FS) ReuseForWrite ¶
func (p *FS) ReuseForWrite(oldname, newname string, category pvfs.DiskWriteCategory) (pvfs.File, error)
ReuseForWrite ...
type Option ¶
type Option interface {
// contains filtered or unexported methods
}
func WithCompactionScheduler ¶
func WithCompactionScheduler(scheduler pebble.CompactionScheduler) Option
func WithEventListener ¶
func WithEventListener(listener pebble.EventListener) Option
func WithLogger ¶
Click to show internal directories.
Click to hide internal directories.