2020-08-24 15:51:42 +00:00
|
|
|
package main
|
|
|
|
|
|
|
|
import (
|
|
|
|
"github.com/nspcc-dev/neofs-api-go/v2/session"
|
|
|
|
sessionGRPC "github.com/nspcc-dev/neofs-api-go/v2/session/grpc"
|
|
|
|
sessionTransportGRPC "github.com/nspcc-dev/neofs-node/pkg/network/transport/session/grpc"
|
|
|
|
sessionSvc "github.com/nspcc-dev/neofs-node/pkg/services/session"
|
|
|
|
"github.com/nspcc-dev/neofs-node/pkg/services/session/storage"
|
|
|
|
)
|
|
|
|
|
|
|
|
func initSessionService(c *cfg) {
|
|
|
|
c.privateTokenStore = storage.New()
|
|
|
|
|
|
|
|
sessionGRPC.RegisterSessionServiceServer(c.cfgGRPC.server,
|
|
|
|
sessionTransportGRPC.New(
|
|
|
|
sessionSvc.NewSignService(
|
|
|
|
c.key,
|
2020-10-22 11:07:06 +00:00
|
|
|
sessionSvc.NewResponseService(
|
|
|
|
sessionSvc.NewExecutionService(
|
|
|
|
c.privateTokenStore,
|
|
|
|
new(session.ResponseMetaHeader),
|
|
|
|
),
|
|
|
|
c.respSvc,
|
2020-08-24 15:51:42 +00:00
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
)
|
|
|
|
}
|