IsOffline returns true if healthcheck enabled and client is offline If HealthCheck function has not been called this will always return false.
()
| 469 | // IsOffline returns true if healthcheck enabled and client is offline |
| 470 | // If HealthCheck function has not been called this will always return false. |
| 471 | func (c *Client) IsOffline() bool { |
| 472 | return atomic.LoadInt32(&c.healthStatus) == offline |
| 473 | } |
| 474 | |
| 475 | // HealthCheck starts a healthcheck to see if endpoint is up. |
| 476 | // Returns a context cancellation function, to stop the health check, |
no outgoing calls