mirror of
https://github.com/etcd-io/etcd.git
synced 2024-09-27 06:25:44 +00:00
style naming the initialization fields for sync command
This commit is contained in:
parent
8b2e1025ef
commit
fe5fb6cfba
@ -73,5 +73,7 @@ func (f *CommandFactory) CreateCompareAndSwapCommand(key string, value string, p
|
||||
}
|
||||
|
||||
func (f *CommandFactory) CreateSyncCommand(now time.Time) raft.Command {
|
||||
return &SyncCommand{time.Now()}
|
||||
return &SyncCommand{
|
||||
Time: time.Now(),
|
||||
}
|
||||
}
|
||||
|
@ -21,7 +21,6 @@ func (c SyncCommand) CommandName() string {
|
||||
}
|
||||
|
||||
func (c SyncCommand) Apply(server raft.Server) (interface{}, error) {
|
||||
|
||||
s, _ := server.StateMachine().(store.Store)
|
||||
s.DeleteExpiredKeys(c.Time)
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user