code: func (m *nodeApplier) Apply(
  	conn redcon.Conn,
  	cmd redcon.Command,
  	mutate func() (interface{}, error),
  	respond func(interface{}) (interface{}, error),
  ) (interface{}, error) {
  	var val interface{}
  	var err error
  	if mutate == nil {
  		// no apply, just do a level guard.
  		if err := (*Node)(m).raftLevelGuard(); err != nil {
  			return nil, err
  		}
  	} else if conn == nil {
  		// this is happening on a follower node.
  		return mutate()
  	} else {
  		// this is happening on the leader node.
  		// apply the command to the raft log.
  		val, err = (*Node)(m).raftApplyCommand(cmd)
  	}
  	if err != nil {
  		return nil, err
  	}
  	// responde
  	return respond(val)
  }
docs: // Apply executes a command through raft.
  // The mutate param should be set to nil for readonly commands.
  // The repsond param is required and any response to conn happens here.
  // The return value from mutate will be passed into the respond param.