forked from TrueCloudLab/frostfs-s3-gw
[#165] Rename SubTreeStreamImpl to SubTreeStreamMemoryImpl
Signed-off-by: Denis Kirillov <d.kirillov@yadro.com>
This commit is contained in:
parent
8a30f18ff6
commit
de32dfd7ce
1 changed files with 4 additions and 4 deletions
|
@ -233,13 +233,13 @@ func (c *ServiceClientMemory) GetSubTree(_ context.Context, bktInfo *data.Bucket
|
||||||
return node.listNodes(nil, depth-1), nil
|
return node.listNodes(nil, depth-1), nil
|
||||||
}
|
}
|
||||||
|
|
||||||
type SubTreeStreamImpl struct {
|
type SubTreeStreamMemoryImpl struct {
|
||||||
res []NodeResponse
|
res []NodeResponse
|
||||||
offset int
|
offset int
|
||||||
err error
|
err error
|
||||||
}
|
}
|
||||||
|
|
||||||
func (s *SubTreeStreamImpl) Next() (NodeResponse, error) {
|
func (s *SubTreeStreamMemoryImpl) Next() (NodeResponse, error) {
|
||||||
if s.err != nil {
|
if s.err != nil {
|
||||||
return nil, s.err
|
return nil, s.err
|
||||||
}
|
}
|
||||||
|
@ -253,7 +253,7 @@ func (s *SubTreeStreamImpl) Next() (NodeResponse, error) {
|
||||||
func (c *ServiceClientMemory) GetSubTreeStream(_ context.Context, bktInfo *data.BucketInfo, treeID string, rootID uint64, depth uint32) (SubTreeStream, error) {
|
func (c *ServiceClientMemory) GetSubTreeStream(_ context.Context, bktInfo *data.BucketInfo, treeID string, rootID uint64, depth uint32) (SubTreeStream, error) {
|
||||||
cnr, ok := c.containers[bktInfo.CID.EncodeToString()]
|
cnr, ok := c.containers[bktInfo.CID.EncodeToString()]
|
||||||
if !ok {
|
if !ok {
|
||||||
return &SubTreeStreamImpl{err: ErrNodeNotFound}, nil
|
return &SubTreeStreamMemoryImpl{err: ErrNodeNotFound}, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
tr, ok := cnr.trees[treeID]
|
tr, ok := cnr.trees[treeID]
|
||||||
|
@ -266,7 +266,7 @@ func (c *ServiceClientMemory) GetSubTreeStream(_ context.Context, bktInfo *data.
|
||||||
return nil, ErrNodeNotFound
|
return nil, ErrNodeNotFound
|
||||||
}
|
}
|
||||||
|
|
||||||
return &SubTreeStreamImpl{
|
return &SubTreeStreamMemoryImpl{
|
||||||
res: node.listNodes(nil, depth-1),
|
res: node.listNodes(nil, depth-1),
|
||||||
offset: 0,
|
offset: 0,
|
||||||
}, nil
|
}, nil
|
||||||
|
|
Loading…
Reference in a new issue