frostfs-node/pkg/local_object_storage/blobstor/common/iterate.go
Evgenii Stratonikov 4176b2a1bc [#1523] local_object_storage: Unify parameters for the Iterate operation
Signed-off-by: Evgenii Stratonikov <evgeniy@nspcc.ru>
2022-08-22 13:14:19 +03:00

24 lines
708 B
Go

package common
import oid "github.com/nspcc-dev/neofs-sdk-go/object/id"
// IterationElement represents a unit of elements through which Iterate operation passes.
type IterationElement struct {
ObjectData []byte
Address oid.Address
StorageID []byte
}
// IterationHandler is a generic processor of IterationElement.
type IterationHandler func(IterationElement) error
// IteratePrm groups the parameters of Iterate operation.
type IteratePrm struct {
Handler IterationHandler
LazyHandler func(oid.Address, func() ([]byte, error)) error
IgnoreErrors bool
ErrorHandler func(oid.Address, error) error
}
// IterateRes groups the resulting values of Iterate operation.
type IterateRes struct{}