seaweedfs/weed/filer2/filerstore.go

22 lines
669 B
Go
Raw Normal View History

2018-05-26 06:27:06 +00:00
package filer2
import (
"errors"
"github.com/chrislusf/seaweedfs/weed/util"
)
2018-05-26 06:27:06 +00:00
type FilerStore interface {
// GetName gets the name to locate the configuration in filer.toml file
GetName() string
2018-06-17 20:01:57 +00:00
// Initialize initializes the file store
Initialize(configuration util.Configuration) error
2018-05-27 18:52:26 +00:00
InsertEntry(*Entry) error
2018-05-26 06:27:06 +00:00
UpdateEntry(*Entry) (err error)
// err == filer2.ErrNotFound if not found
FindEntry(FullPath) (entry *Entry, err error)
DeleteEntry(FullPath) (err error)
ListDirectoryEntries(dirPath FullPath, startFileName string, includeStartFile bool, limit int) ([]*Entry, error)
2018-05-26 06:27:06 +00:00
}
var ErrNotFound = errors.New("filer: no entry is found in filer store")