diff --git a/pkg/service/tree/tree_client_in_memory.go b/pkg/service/tree/tree_client_in_memory.go index 36e4e18c..dc8fe2ba 100644 --- a/pkg/service/tree/tree_client_in_memory.go +++ b/pkg/service/tree/tree_client_in_memory.go @@ -233,13 +233,13 @@ func (c *ServiceClientMemory) GetSubTree(_ context.Context, bktInfo *data.Bucket return node.listNodes(nil, depth-1), nil } -type SubTreeStreamImpl struct { +type SubTreeStreamMemoryImpl struct { res []NodeResponse offset int err error } -func (s *SubTreeStreamImpl) Next() (NodeResponse, error) { +func (s *SubTreeStreamMemoryImpl) Next() (NodeResponse, error) { if s.err != nil { 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) { cnr, ok := c.containers[bktInfo.CID.EncodeToString()] if !ok { - return &SubTreeStreamImpl{err: ErrNodeNotFound}, nil + return &SubTreeStreamMemoryImpl{err: ErrNodeNotFound}, nil } tr, ok := cnr.trees[treeID] @@ -266,7 +266,7 @@ func (c *ServiceClientMemory) GetSubTreeStream(_ context.Context, bktInfo *data. return nil, ErrNodeNotFound } - return &SubTreeStreamImpl{ + return &SubTreeStreamMemoryImpl{ res: node.listNodes(nil, depth-1), offset: 0, }, nil