mirror of
https://github.com/EchoVault/SugarDB.git
synced 2025-10-05 07:56:52 +08:00
Added godoc comments for echovault.go exported functions
This commit is contained in:
File diff suppressed because it is too large
Load Diff
@@ -474,6 +474,7 @@ func (server *EchoVault) setLatestSnapshot(msec int64) {
|
||||
server.latestSnapshotMilliseconds.Store(msec)
|
||||
}
|
||||
|
||||
// GetLatestSnapshotTime returns the latest snapshot time in unix epoch milliseconds.
|
||||
func (server *EchoVault) GetLatestSnapshotTime() int64 {
|
||||
return server.latestSnapshotMilliseconds.Load()
|
||||
}
|
||||
@@ -486,6 +487,7 @@ func (server *EchoVault) finishRewriteAOF() {
|
||||
server.rewriteAOFInProgress.Store(false)
|
||||
}
|
||||
|
||||
// RewriteAOF triggers an AOF compaction when running in standalone mode.
|
||||
func (server *EchoVault) RewriteAOF() error {
|
||||
if server.rewriteAOFInProgress.Load() {
|
||||
return errors.New("aof rewrite in progress")
|
||||
@@ -498,6 +500,8 @@ func (server *EchoVault) RewriteAOF() error {
|
||||
return nil
|
||||
}
|
||||
|
||||
// ShutDown gracefully shuts down the EchoVault instance.
|
||||
// This function shuts down the memberlist and raft layers.
|
||||
func (server *EchoVault) ShutDown() {
|
||||
if server.isInCluster() {
|
||||
server.raft.RaftShutdown()
|
||||
|
@@ -39,9 +39,6 @@ type EchoVault interface {
|
||||
TakeSnapshot() error
|
||||
RewriteAOF() error
|
||||
GetLatestSnapshotTime() int64
|
||||
//StartSnapshot()
|
||||
//FinishSnapshot()
|
||||
//SetLatestSnapshot(msec int64)
|
||||
}
|
||||
|
||||
type KeyExtractionFunc func(cmd []string) ([]string, error)
|
||||
|
Reference in New Issue
Block a user