forked from TrueCloudLab/frostfs-node
69a69cdbee
Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
35 lines
566 B
Go
35 lines
566 B
Go
package v2
|
|
|
|
import (
|
|
"github.com/nspcc-dev/neofs-node/pkg/local_object_storage/localstore"
|
|
)
|
|
|
|
func WithObjectStorage(v ObjectStorage) Option {
|
|
return func(c *cfg) {
|
|
c.storage = v
|
|
}
|
|
}
|
|
|
|
func WithLocalObjectStorage(v *localstore.Storage) 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,
|
|
}
|
|
}
|
|
}
|