diff options
| author | Chris Lu <chris.lu@gmail.com> | 2020-04-21 21:16:13 -0700 |
|---|---|---|
| committer | Chris Lu <chris.lu@gmail.com> | 2020-04-21 21:16:13 -0700 |
| commit | e24b25de784daf42a15daf573249d608ebc2b44a (patch) | |
| tree | 53418a50125f664565572aea8e7fa10950c90a12 /weed/filer2/entry.go | |
| parent | 4f02f7121d232507bbbba825fa241bc8d5e630ff (diff) | |
| download | seaweedfs-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.go | 8 |
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, + } +} |
