filesys

package
v0.0.0-...-a313e43 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 18, 2019 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Driver

type Driver interface {
	Lookup(uuid string, stripeID int) error
	Persist(uuid string, stripeID int, metadata string) error
	Delete(uuid string) error
	PrintStats(elapsed time.Duration)
}

Driver is an interface that a filesystem metadata engine can implement.

type FS

type FS struct {
	// contains filtered or unexported fields
}

FS is a simulated filesystem that supports basic read/write methods to generate metadata workload.

func New

func New(driverName string, drop bool) (*FS, error)

New returns a new filesystem with a driver initialized based on driverName. drop is passed on to the driver on initialization, drivers typically will use to determine whether existing tables should be dropped upon initialization.

func (*FS) Delete

func (fs *FS) Delete(filename string)

Delete file filename along with all its stripes.

func (*FS) PrintStats

func (fs *FS) PrintStats()

PrintStats prints statistics collected during filesystem workload execution.

func (*FS) Read

func (fs *FS) Read(filename string, size int, wg *sync.WaitGroup)

Read file filename sequentially up to size number of stripes.

func (*FS) Write

func (fs *FS) Write(filename string, size int, wg *sync.WaitGroup)

Write file filename with size number of stripes.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL