aboutsummaryrefslogtreecommitdiff
path: root/weed/filer2/entry.go
diff options
context:
space:
mode:
authorChris Lu <chris.lu@gmail.com>2020-04-21 21:16:13 -0700
committerChris Lu <chris.lu@gmail.com>2020-04-21 21:16:13 -0700
commite24b25de784daf42a15daf573249d608ebc2b44a (patch)
tree53418a50125f664565572aea8e7fa10950c90a12 /weed/filer2/entry.go
parent4f02f7121d232507bbbba825fa241bc8d5e630ff (diff)
downloadseaweedfs-e24b25de784daf42a15daf573249d608ebc2b44a.tar.xz
seaweedfs-e24b25de784daf42a15daf573249d608ebc2b44a.zip
async meta caching: can stream updates now
Diffstat (limited to 'weed/filer2/entry.go')
-rw-r--r--weed/filer2/entry.go8
1 files changed, 8 insertions, 0 deletions
diff --git a/weed/filer2/entry.go b/weed/filer2/entry.go
index 6dff99af9..00b9b132d 100644
--- a/weed/filer2/entry.go
+++ b/weed/filer2/entry.go
@@ -73,3 +73,11 @@ func (entry *Entry) ToProtoFullEntry() *filer_pb.FullEntry {
Entry: entry.ToProtoEntry(),
}
}
+
+func FromPbEntry(dir string, entry *filer_pb.Entry) *Entry {
+ return &Entry{
+ FullPath: util.NewFullPath(dir, entry.Name),
+ Attr: PbToEntryAttribute(entry.Attributes),
+ Chunks: entry.Chunks,
+ }
+}