Extract Store into an interface.

This commit is contained in:
Ben Johnson
2013-10-14 11:12:30 -06:00
parent a6a32a592d
commit 1321c63f3b
14 changed files with 92 additions and 68 deletions

View File

@ -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())