func (s *StopPolicy) IsHealthy() (healthy bool) {
	s.SyncObject.Lock()
	defer s.SyncObject.Unlock()
	if s.MaximumErrorThreshold == 0 {
		return true
	}

	// now if either of policy allows we allow the agent to proceed
	return (0 < s.MaximumErrorThreshold && s.errorCount < s.MaximumErrorThreshold)
}
// IsHealthy returns true if the policy determines the handler is safe to call otherwise false.
IsHealthy returns true if the policy determines the handler is safe to call otherwise false.
// IsHealthy returns true if the policy determines the handler is safe to call otherwise false .
func (s *StopPolicy) IsHealthy() (healthy bool) {
	s.SyncObject.Lock()
	defer s.SyncObject.Unlock()
	if s.MaximumErrorThreshold == 0 {
		return true
	}
	return (0 < s.MaximumErrorThreshold && s.errorCount < s.MaximumErrorThreshold)
}
func ( s * StopPolicy ) IsHealthy ( ) ( healthy bool ) { s . SyncObject . Lock ( ) defer s . SyncObject . Unlock ( ) if s . MaximumErrorThreshold == 0 { return true } return ( 0 < s . MaximumErrorThreshold && s . errorCount < s . MaximumErrorThreshold ) }
IsHealthy returns true if the policy determines the handler is safe to call otherwise false.
IsHealthy returns true if the policy determines the handler is safe to call otherwise false .
// now if either of policy allows we allow the agent to proceed