mirror of
https://github.com/EchoVault/SugarDB.git
synced 2025-10-27 18:00:33 +08:00
Created ACL and PubSub interfaces to be used in Server struct definition to avoid future circular imports in acl and pubsub packages
This commit is contained in:
@@ -7,8 +7,6 @@ import (
|
|||||||
"errors"
|
"errors"
|
||||||
"fmt"
|
"fmt"
|
||||||
"github.com/echovault/echovault/src/memberlist"
|
"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/raft"
|
||||||
"github.com/echovault/echovault/src/server/aof"
|
"github.com/echovault/echovault/src/server/aof"
|
||||||
"github.com/echovault/echovault/src/server/snapshot"
|
"github.com/echovault/echovault/src/server/snapshot"
|
||||||
@@ -38,8 +36,8 @@ type Server struct {
|
|||||||
|
|
||||||
CancelCh *chan os.Signal
|
CancelCh *chan os.Signal
|
||||||
|
|
||||||
ACL *acl.ACL
|
ACL utils.ACL
|
||||||
PubSub *pubsub.PubSub
|
PubSub utils.PubSub
|
||||||
|
|
||||||
SnapshotInProgress atomic.Bool
|
SnapshotInProgress atomic.Bool
|
||||||
RewriteAOFInProgress atomic.Bool
|
RewriteAOFInProgress atomic.Bool
|
||||||
|
|||||||
@@ -68,6 +68,14 @@ type Plugin interface {
|
|||||||
Description() string
|
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 {
|
type SnapshotObject struct {
|
||||||
State map[string]interface{}
|
State map[string]interface{}
|
||||||
LatestSnapshotMilliseconds int64
|
LatestSnapshotMilliseconds int64
|
||||||
|
|||||||
Reference in New Issue
Block a user