In that circumstance, it sounds as if the individual was fighting police, if he continues to resist that is deemed a physical threat that may result in injury to either himself or police!
In that case the taser may be deployed, usually via direct contact as a means of pain compliance and effecting a cessation of resistance, especially in a violent altercation.
As a result is deemed justified in that situation.