2023-02-18 14:18:10 +00:00
|
|
|
package slicer
|
|
|
|
|
|
|
|
// Options groups Slicer options.
|
|
|
|
type Options struct {
|
|
|
|
objectPayloadLimit uint64
|
|
|
|
|
|
|
|
currentNeoFSEpoch uint64
|
2023-04-26 10:17:06 +00:00
|
|
|
|
|
|
|
withHomoChecksum bool
|
2023-02-18 14:18:10 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// SetObjectPayloadLimit specifies data size limit for produced physically
|
|
|
|
// stored objects.
|
|
|
|
func (x *Options) SetObjectPayloadLimit(l uint64) {
|
|
|
|
x.objectPayloadLimit = l
|
|
|
|
}
|
|
|
|
|
|
|
|
// SetCurrentNeoFSEpoch sets current NeoFS epoch.
|
|
|
|
func (x *Options) SetCurrentNeoFSEpoch(e uint64) {
|
|
|
|
x.currentNeoFSEpoch = e
|
|
|
|
}
|
2023-04-26 10:17:06 +00:00
|
|
|
|
|
|
|
// CalculateHomomorphicChecksum makes Slicer to calculate and set homomorphic
|
|
|
|
// checksum of the processed objects.
|
|
|
|
func (x *Options) CalculateHomomorphicChecksum() {
|
|
|
|
x.withHomoChecksum = true
|
|
|
|
}
|