forked from TrueCloudLab/frostfs-sdk-go
8eded316de
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>
19 lines
432 B
Go
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
|
|
}
|