Extract Store into an interface.
This commit is contained in:
@ -26,7 +26,7 @@ func (c *CreateCommand) CommandName() string {
|
||||
|
||||
// Create node
|
||||
func (c *CreateCommand) Apply(server *raft.Server) (interface{}, error) {
|
||||
s, _ := server.StateMachine().(*Store)
|
||||
s, _ := server.StateMachine().(Store)
|
||||
|
||||
e, err := s.Create(c.Key, c.Value, c.IncrementalSuffix, c.Force, c.ExpireTime, server.CommitIndex(), server.Term())
|
||||
|
||||
|
Reference in New Issue
Block a user