Handle new Raft API

This commit is contained in:
Armon Dadgar 2014-01-03 17:15:09 -08:00
parent 29fe144b5b
commit 1e3adb54f3

View File

@ -42,7 +42,8 @@ func (c *consulFSM) State() *StateStore {
return c.state return c.state
} }
func (c *consulFSM) Apply(buf []byte) interface{} { func (c *consulFSM) Apply(log *raft.Log) interface{} {
buf := log.Data
switch structs.MessageType(buf[0]) { switch structs.MessageType(buf[0]) {
case structs.RegisterRequestType: case structs.RegisterRequestType:
return c.applyRegister(buf[1:]) return c.applyRegister(buf[1:])