lstorage

package
v0.0.0-...-ae6cc27 Latest Latest
Warning

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

Go to latest
Published: Jun 5, 2018 License: BSD-3-Clause Imports: 4 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type LStorage

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

LStorage implements the strata.Storage interface using a locally mounted file system as its storage backing

func NewLStorage

func NewLStorage(mountPoint string) (*LStorage, error)

NewLStorage initializes the LStorage

func (*LStorage) Delete

func (ls *LStorage) Delete(fpath string) error

Delete removes the object at the given path

func (*LStorage) Get

func (ls *LStorage) Get(fpath string) (io.ReadCloser, error)

Get returns a reader to the specified path

func (*LStorage) List

func (ls *LStorage) List(dir string, maxSize int) ([]string, error)

List returns a list of files (up to maxSize) in the given directory. Recursively search for files. If the directory does not exist, return an empty list.

func (*LStorage) Lock

func (ls *LStorage) Lock(fpath string) error

Lock is not implemented

func (*LStorage) Put

func (ls *LStorage) Put(fpath string, data []byte) error

Put places the byte slice at the given path.

func (*LStorage) PutReader

func (ls *LStorage) PutReader(fpath string, reader io.Reader) error

PutReader consumes the given reader and stores it at the specified path.

func (*LStorage) Unlock

func (ls *LStorage) Unlock(fpath string) error

Unlock is not implemented

Jump to

Keyboard shortcuts

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