diff --git a/src/server/server.go b/src/server/server.go index 973447a..630a5d4 100644 --- a/src/server/server.go +++ b/src/server/server.go @@ -7,8 +7,6 @@ import ( "errors" "fmt" "github.com/echovault/echovault/src/memberlist" - "github.com/echovault/echovault/src/modules/acl" - "github.com/echovault/echovault/src/modules/pubsub" "github.com/echovault/echovault/src/raft" "github.com/echovault/echovault/src/server/aof" "github.com/echovault/echovault/src/server/snapshot" @@ -38,8 +36,8 @@ type Server struct { CancelCh *chan os.Signal - ACL *acl.ACL - PubSub *pubsub.PubSub + ACL utils.ACL + PubSub utils.PubSub SnapshotInProgress atomic.Bool RewriteAOFInProgress atomic.Bool diff --git a/src/utils/types.go b/src/utils/types.go index 6e22015..2233163 100644 --- a/src/utils/types.go +++ b/src/utils/types.go @@ -68,6 +68,14 @@ type Plugin interface { Description() string } +type ACL interface { + RegisterConnection(conn *net.Conn) + AuthorizeConnection(conn *net.Conn, cmd []string, command Command, subCommand SubCommand) error +} + +type PubSub interface { +} + type SnapshotObject struct { State map[string]interface{} LatestSnapshotMilliseconds int64