frostfs-node/pkg/services/object/acl/eacl/v2/opts.go
Leonard Lyubich 953387a1e5 [#186] object/acl: Use new storage engine for work
Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
2020-12-11 17:19:37 +03:00

35 lines
564 B
Go

package v2
import (
"github.com/nspcc-dev/neofs-node/pkg/local_object_storage/engine"
)
func WithObjectStorage(v ObjectStorage) Option {
return func(c *cfg) {
c.storage = v
}
}
func WithLocalObjectStorage(v *engine.StorageEngine) Option {
return func(c *cfg) {
c.storage = &localStorage{
ls: v,
}
}
}
func WithServiceRequest(v Request) Option {
return func(c *cfg) {
c.msg = &requestXHeaderSource{
req: v,
}
}
}
func WithServiceResponse(v Response) Option {
return func(c *cfg) {
c.msg = &responseXHeaderSource{
resp: v,
}
}
}