[#1255] node/session: Create separate dir for in-memory storage

Move in-memory session storage to the separate directory of `storage`. It is
done for future support of different kind of session storages.

Signed-off-by: Pavel Karpy <carpawell@nspcc.ru>
This commit is contained in:
Pavel Karpy 2022-03-18 11:46:07 +03:00 committed by Alex Vanin
parent 2a69aaf976
commit 929c9851a6
7 changed files with 36 additions and 19 deletions

View file

@ -37,7 +37,7 @@ import (
"github.com/nspcc-dev/neofs-node/pkg/services/object/acl/eacl"
trustcontroller "github.com/nspcc-dev/neofs-node/pkg/services/reputation/local/controller"
truststorage "github.com/nspcc-dev/neofs-node/pkg/services/reputation/local/storage"
tokenStorage "github.com/nspcc-dev/neofs-node/pkg/services/session/storage"
tokenStorage "github.com/nspcc-dev/neofs-node/pkg/services/session/storage/temporary"
"github.com/nspcc-dev/neofs-node/pkg/services/util/response"
"github.com/nspcc-dev/neofs-node/pkg/util"
"github.com/nspcc-dev/neofs-node/pkg/util/logger"

View file

@ -6,11 +6,11 @@ import (
"github.com/nspcc-dev/neofs-node/pkg/morph/event/netmap"
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"
"github.com/nspcc-dev/neofs-node/pkg/services/session/storage/temporary"
)
func initSessionService(c *cfg) {
c.privateTokenStore = storage.New()
c.privateTokenStore = temporary.NewTokenStore()
addNewEpochNotificationHandler(c, func(ev event.Event) {
c.privateTokenStore.RemoveOld(ev.(netmap.NewEpoch).EpochNumber())
})