34 lines
611 B
Go
34 lines
611 B
Go
package server
|
|
|
|
import (
|
|
"crypto/ecdsa"
|
|
|
|
"git.frostfs.info/TrueCloudLab/frostfs-node/pkg/core/container"
|
|
"git.frostfs.info/TrueCloudLab/frostfs-node/pkg/local_object_storage/engine"
|
|
)
|
|
|
|
type cfg struct {
|
|
key *ecdsa.PrivateKey
|
|
allowedKeys [][]byte
|
|
cnrSrc container.Source
|
|
se *engine.StorageEngine
|
|
}
|
|
|
|
type Server struct {
|
|
*cfg
|
|
}
|
|
|
|
func New(key *ecdsa.PrivateKey,
|
|
allowedKeys [][]byte,
|
|
cnrSrc container.Source,
|
|
se *engine.StorageEngine,
|
|
) *Server {
|
|
return &Server{
|
|
cfg: &cfg{
|
|
key: key,
|
|
allowedKeys: allowedKeys,
|
|
cnrSrc: cnrSrc,
|
|
se: se,
|
|
},
|
|
}
|
|
}
|