[#306] cmd/node: Serve private node service in storage node app

Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
This commit is contained in:
Leonard Lyubich 2021-01-13 15:51:05 +03:00 committed by Alex Vanin
parent c1b8a4815f
commit f3cac6cc31
3 changed files with 77 additions and 0 deletions

View file

@ -179,6 +179,8 @@ type cfg struct {
workers []worker
respSvc *response.Service
cfgPrivateService cfgPrivateService
}
type cfgGRPC struct {
@ -258,6 +260,10 @@ type cfgObjectRoutines struct {
get, head, put, search, rng, rngHash *ants.Pool
}
type cfgPrivateService struct {
server *grpc.Server
}
const (
_ BootstrapType = iota
StorageNode
@ -412,6 +418,8 @@ func defaultConfiguration(v *viper.Viper) {
v.SetDefault(cfgObjectSearchPoolSize, 10)
v.SetDefault(cfgObjectRangePoolSize, 10)
v.SetDefault(cfgObjectRangeHashPoolSize, 10)
v.SetDefault(cfgPrivateSvcAllowedKeys, []string{})
}
func (c *cfg) LocalAddress() *network.Address {