forked from TrueCloudLab/frostfs-node
35 lines
498 B
Go
35 lines
498 B
Go
package blobtree
|
|
|
|
import "io/fs"
|
|
|
|
type Option func(*cfg)
|
|
|
|
func WithPath(path string) Option {
|
|
return func(c *cfg) {
|
|
c.rootPath = path
|
|
}
|
|
}
|
|
|
|
func WithDepth(depth uint64) Option {
|
|
return func(c *cfg) {
|
|
c.depth = depth
|
|
}
|
|
}
|
|
|
|
func WithPerm(p fs.FileMode) Option {
|
|
return func(c *cfg) {
|
|
c.permissions = p
|
|
}
|
|
}
|
|
|
|
func WithTargetSize(size uint64) Option {
|
|
return func(c *cfg) {
|
|
c.targetFileSizeBytes = size
|
|
}
|
|
}
|
|
|
|
func WithMetrics(m Metrics) Option {
|
|
return func(c *cfg) {
|
|
c.metrics = m
|
|
}
|
|
}
|