Documentation ¶
Index ¶
- Variables
- func Clean(dir string) string
- func IsExist(err error) bool
- func IsNotExist(err error) bool
- func NewPebbleFS(fs IFS) pvfs.FS
- func ReportLeakedFD(fs IFS, t *testing.T)
- func TempDir() string
- type ErrorFS
- type File
- type IFS
- type InjectIndex
- type Injector
- type MemFS
- type Op
- type PebbleFS
- func (p *PebbleFS) Create(name string) (pvfs.File, error)
- func (p *PebbleFS) GetFreeSpace(path string) (uint64, error)
- func (p *PebbleFS) Link(oldname, newname string) error
- func (p *PebbleFS) List(dir string) ([]string, error)
- func (p *PebbleFS) Lock(name string) (io.Closer, error)
- func (p *PebbleFS) MkdirAll(dir string, perm os.FileMode) error
- func (p *PebbleFS) Open(name string, opts ...pvfs.OpenOption) (pvfs.File, error)
- func (p *PebbleFS) OpenDir(name string) (pvfs.File, error)
- func (p *PebbleFS) PathBase(path string) string
- func (p *PebbleFS) PathDir(path string) string
- func (p *PebbleFS) PathJoin(elem ...string) string
- func (p *PebbleFS) Remove(name string) error
- func (p *PebbleFS) RemoveAll(name string) error
- func (p *PebbleFS) Rename(oldname, newname string) error
- func (p *PebbleFS) ReuseForWrite(oldname, newname string) (pvfs.File, error)
- func (p *PebbleFS) Stat(name string) (os.FileInfo, error)
Constants ¶
This section is empty.
Variables ¶
var ErrInjected = gvfs.ErrInjected
ErrInjected is an error injected for testing purposes.
var OpRead = gvfs.OpRead
OpRead describes read operations
var OpSync = gvfs.OpSync
OpSync describes the fsync operation
var OpWrite = gvfs.OpWrite
OpWrite describes write operations
Functions ¶
func IsExist ¶
IsExist returns a boolean value indicating whether the specified error is to indicate that a file or directory already exists.
func IsNotExist ¶
IsNotExist returns a boolean value indicating whether the specified error is to indicate that a file or directory does not exist.
func NewPebbleFS ¶
NewPebbleFS creates a new pebble/vfs.FS instance.
func ReportLeakedFD ¶
ReportLeakedFD reports leaked file fds.
Types ¶
type IFS ¶
IFS is the vfs interface used by dragonboat.
var MemStrictFS IFS = gvfs.NewStrictMem()
MemStrictFS is a vfs instance using memfs.
type InjectIndex ¶
type InjectIndex = gvfs.InjectIndex
InjectIndex implements Injector
func OnIndex ¶
func OnIndex(index int32, op Op) *InjectIndex
OnIndex creates and returns an injector instance that returns an ErrInjected on the (n+1)-th invocation of its MaybeError function.
type PebbleFS ¶
type PebbleFS struct {
// contains filtered or unexported fields
}
PebbleFS is a wrapper struct that implements the pebble/vfs.FS interface.
func (*PebbleFS) GetFreeSpace ¶
GetFreeSpace ...
func (*PebbleFS) ReuseForWrite ¶
ReuseForWrite ...