func (s *State) StateString(state int) string {
	switch state {
	case StateFollower:
		return "follower"
	case StateCandidate:
		return "candidate"
	case StateLeader:
		return "leader"
	}
	return "unknown"
}
// StateString returns the current state as a string.
StateString returns the current state as a string.
// StateString returns the current state as a string .
func (s *State) StateString(state int) string {
	switch state {
	case StateFollower:
		return "follower"
	case StateCandidate:
		return "candidate"
	case StateLeader:
		return "leader"
	}
	return "unknown"
}
func ( s * State ) StateString ( state int ) string { switch state { case StateFollower : return " " case StateCandidate : return " " case StateLeader : return " " } return " " }
StateString returns the current state as a string.
StateString returns the current state as a string .