frostfs-node/pkg/local_object_storage/blobstor/blobtree/option.go
Dmitrii Stepanov fba369ec34 [#645] blobtree: Add metrics
Signed-off-by: Dmitrii Stepanov <d.stepanov@yadro.com>
2023-11-29 19:34:22 +03:00

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
}
}