frostfs-sdk-go/object/slicer/options.go
Leonard Lyubich 8eded316de Initial commit of static object slicer
There is a need to provide convenient function which allows to slice
user data into objects to be stored in NeoFS. The main challenge is to
produce objects compliant with the format described in the NeoFS
Specification.

Add `object/slicer` package. Export `Slicer` type which performs data
slicing.

Refs #342.

Signed-off-by: Leonard Lyubich <leonard@morphbits.io>
2023-04-26 21:38:05 +04:00

19 lines
432 B
Go

package slicer
// Options groups Slicer options.
type Options struct {
objectPayloadLimit uint64
currentNeoFSEpoch uint64
}
// 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
}