mirror of
https://github.com/EchoVault/SugarDB.git
synced 2025-10-18 14:00:42 +08:00
Moved some types into internal folder as they will do not need to be exported. Changed GetState method to getState to make it private to the echovault package
This commit is contained in:
@@ -18,6 +18,7 @@ import (
|
||||
"context"
|
||||
"errors"
|
||||
"fmt"
|
||||
"github.com/echovault/echovault/internal"
|
||||
"github.com/echovault/echovault/internal/config"
|
||||
"github.com/echovault/echovault/internal/memberlist"
|
||||
"log"
|
||||
@@ -34,6 +35,7 @@ import (
|
||||
type Opts struct {
|
||||
Config config.Config
|
||||
EchoVault utils.EchoVault
|
||||
GetState func() map[string]internal.KeyData
|
||||
GetCommand func(command string) (utils.Command, error)
|
||||
DeleteKey func(ctx context.Context, key string) error
|
||||
}
|
||||
@@ -109,6 +111,7 @@ func (r *Raft) RaftInit(ctx context.Context) {
|
||||
NewFSM(FSMOpts{
|
||||
Config: r.options.Config,
|
||||
EchoVault: r.options.EchoVault,
|
||||
GetState: r.options.GetState,
|
||||
GetCommand: r.options.GetCommand,
|
||||
DeleteKey: r.options.DeleteKey,
|
||||
}),
|
||||
|
Reference in New Issue
Block a user