Alex Vanin
20de74a505
Due to source code relocation from GitHub. Signed-off-by: Alex Vanin <a.vanin@yadro.com>
25 lines
638 B
Go
25 lines
638 B
Go
package policer
|
|
|
|
import (
|
|
"fmt"
|
|
|
|
objectcore "git.frostfs.info/TrueCloudLab/frostfs-node/pkg/core/object"
|
|
"git.frostfs.info/TrueCloudLab/frostfs-node/pkg/local_object_storage/engine"
|
|
)
|
|
|
|
type jobQueue struct {
|
|
localStorage *engine.StorageEngine
|
|
}
|
|
|
|
func (q *jobQueue) Select(cursor *engine.Cursor, count uint32) ([]objectcore.AddressWithType, *engine.Cursor, error) {
|
|
var prm engine.ListWithCursorPrm
|
|
prm.WithCursor(cursor)
|
|
prm.WithCount(count)
|
|
|
|
res, err := q.localStorage.ListWithCursor(prm)
|
|
if err != nil {
|
|
return nil, nil, fmt.Errorf("cannot list objects in engine: %w", err)
|
|
}
|
|
|
|
return res.AddressList(), res.Cursor(), nil
|
|
}
|