You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

43 lines
1.1 KiB

7 years ago
7 years ago
7 years ago
7 years ago
  1. package embedded
  2. import (
  3. "github.com/syndtr/goleveldb/leveldb"
  4. "github.com/chrislusf/seaweedfs/weed/filer2"
  5. "github.com/chrislusf/seaweedfs/weed/pb/filer_pb"
  6. )
  7. type EmbeddedStore struct {
  8. db *leveldb.DB
  9. }
  10. func NewEmbeddedStore(dir string) (filer *EmbeddedStore, err error) {
  11. filer = &EmbeddedStore{}
  12. if filer.db, err = leveldb.OpenFile(dir, nil); err != nil {
  13. return
  14. }
  15. return
  16. }
  17. func (filer *EmbeddedStore) InsertEntry(entry *filer2.Entry) (err error) {
  18. return nil
  19. }
  20. func (filer *EmbeddedStore) AddDirectoryLink(directory *filer2.Entry, delta int32) (err error) {
  21. return nil
  22. }
  23. func (filer *EmbeddedStore) AppendFileChunk(fullpath filer2.FullPath, fileChunks []*filer_pb.FileChunk) (err error) {
  24. return nil
  25. }
  26. func (filer *EmbeddedStore) FindEntry(fullpath filer2.FullPath) (found bool, entry *filer2.Entry, err error) {
  27. return false, nil, nil
  28. }
  29. func (filer *EmbeddedStore) DeleteEntry(fullpath filer2.FullPath) (entry *filer2.Entry, err error) {
  30. return nil, nil
  31. }
  32. func (filer *EmbeddedStore) ListDirectoryEntries(fullpath filer2.FullPath, startFileName string, inclusive bool, limit int) (entries []*filer2.Entry, err error) {
  33. return nil, nil
  34. }