Documentation ¶
Index ¶
- Constants
- Variables
- type Client
- func (c *Client) Auto(every time.Duration)
- func (c *Client) ExitStatus(exitCode int, optionalBody ...io.Reader)
- func (c *Client) Fail(optionalBody ...io.Reader)
- func (c *Client) Log(optionalBody ...io.Reader)
- func (c *Client) Shutdown()
- func (c *Client) Start(optionalBody ...io.Reader)
- func (c *Client) Success(optionalBody ...io.Reader)
- type ErrLog
Constants ¶
View Source
const DefaultAPI = "https://hc-ping.com"
DefaultAPI base url for checks
Variables ¶
View Source
var DefaultErrLog = func(operation string, err error) { fmt.Printf("healtchecks operation %q failed: %v\n", operation, err) }
DefaultErrLog if you don't provide one yourself
Functions ¶
This section is empty.
Types ¶
type Client ¶
Client for healthchecks
func (*Client) Auto ¶
Auto is intended to start as separate goroutine (go c.Auto(5*time.Second)) it will automatically send Success (ping) requests, leaving the client itself fully usable to stop the Auto(), call Shutdown() and destroy the client
func (*Client) ExitStatus ¶
ExitStatus signal sends job's exit code (0-255)
Click to show internal directories.
Click to hide internal directories.