BackendHealthcheckOptions
type BackendHealthcheckOptions struct { // contains filtered or unexported fields}Methods
Initial
View sourcefunc (h *BackendHealthcheckOptions) Initial(initial uint32) *BackendHealthcheckOptionsInitial sets the number of successes to assume are successful when beginning a health check. Must not be greater than the current window.
Defaults to 4.
Parameters
- initial: uint32
Returns
Interval
View sourceInterval sets the interval where a health check should be performed. Times must be 1 second to 1 hour inclusive. Must be less than the current timeout.
Defaults to 15 seconds.
Parameters
Returns
Method
View sourcefunc (h *BackendHealthcheckOptions) Method(m string) *BackendHealthcheckOptionsMethod sets an HTTP verb (i.e., HEAD, GET, or POST) to use when performing the health check.
Defaults to "GET".
Parameters
- m: string
Returns
Path
View sourcefunc (h *BackendHealthcheckOptions) Path(p string) *BackendHealthcheckOptionsPath sets a path to visit on your origins when performing the check. Use a unique path. For example, use /website-healthcheck.txt, not / or /healthcheck.
Defaults to "/".
Parameters
- p: string
Returns
Status
View sourcefunc (h *BackendHealthcheckOptions) Status(status uint32) *BackendHealthcheckOptionsStatus sets the HTTP status code that signifies a healthy state.
Defaults to 200.
Parameters
- status: uint32
Returns
Threshold
View sourcefunc (h *BackendHealthcheckOptions) Threshold(threshold uint32) *BackendHealthcheckOptionsThreshold sets the number of health checks that must be successful within the window to be considered healthy. Must not be greater than the current window.
Defaults to 3.
Parameters
- threshold: uint32
Returns
Timeout
View sourceTimeout sets the time in which to perform the health check. Note that querying the health check renews the timer. Must not be less than the current interval.
Defaults to 5 seconds.
Parameters
Returns
Window
View sourcefunc (h *BackendHealthcheckOptions) Window(w uint32) *BackendHealthcheckOptionsWindow sets the number of most recent health check queries to keep. Must not be greater than 15.
Defaults to 5.
Parameters
- w: uint32
Returns