aboutsummaryrefslogtreecommitdiff
path: root/weed/filer2/filerstore.go
diff options
context:
space:
mode:
authorChris Lu <chris.lu@uber.com>2019-03-15 15:55:34 -0700
committerChris Lu <chris.lu@uber.com>2019-03-15 15:55:34 -0700
commitcece860bfde443d4f8cddb04b10fb98a998995ed (patch)
treef6ae14d8666da869b9ad6bb0a5eac2fd9c8c9b02 /weed/filer2/filerstore.go
parent55c85f3a66fce8ba2d8613fc3fd2b0de1ca46bde (diff)
downloadseaweedfs-cece860bfde443d4f8cddb04b10fb98a998995ed.tar.xz
seaweedfs-cece860bfde443d4f8cddb04b10fb98a998995ed.zip
add context to all filer APIs
Diffstat (limited to 'weed/filer2/filerstore.go')
-rw-r--r--weed/filer2/filerstore.go11
1 files changed, 6 insertions, 5 deletions
diff --git a/weed/filer2/filerstore.go b/weed/filer2/filerstore.go
index 9ef1d9d48..c10074eb2 100644
--- a/weed/filer2/filerstore.go
+++ b/weed/filer2/filerstore.go
@@ -1,6 +1,7 @@
package filer2
import (
+ "context"
"errors"
"github.com/chrislusf/seaweedfs/weed/util"
)
@@ -10,12 +11,12 @@ type FilerStore interface {
GetName() string
// Initialize initializes the file store
Initialize(configuration util.Configuration) error
- InsertEntry(*Entry) error
- UpdateEntry(*Entry) (err error)
+ InsertEntry(context.Context, *Entry) error
+ UpdateEntry(context.Context, *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)
+ FindEntry(context.Context, FullPath) (entry *Entry, err error)
+ DeleteEntry(context.Context, FullPath) (err error)
+ ListDirectoryEntries(ctx context.Context, dirPath FullPath, startFileName string, includeStartFile bool, limit int) ([]*Entry, error)
}
var ErrNotFound = errors.New("filer: no entry is found in filer store")