From de32dfd7ce14795a962b07eb495026eccba64f89 Mon Sep 17 00:00:00 2001 From: Denis Kirillov Date: Sun, 21 Jan 2024 15:30:30 +0300 Subject: [PATCH] [#165] Rename SubTreeStreamImpl to SubTreeStreamMemoryImpl Signed-off-by: Denis Kirillov --- pkg/service/tree/tree_client_in_memory.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) 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