BackendHealthcheckOptions

Structin fsthttpcompute-sdk-go v1.11.0View source
type BackendHealthcheckOptions struct {
// contains filtered or unexported fields
}

Methods

func (h *BackendHealthcheckOptions) Initial(initial uint32) *BackendHealthcheckOptions

Initial 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 source
func (h *BackendHealthcheckOptions) Interval(t time.Duration) *BackendHealthcheckOptions

Interval 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

t: time.Duration

Returns

func (h *BackendHealthcheckOptions) Method(m string) *BackendHealthcheckOptions

Method sets an HTTP verb (i.e., HEAD, GET, or POST) to use when performing the health check.

Defaults to "GET".

Parameters

m: string

Returns

func (h *BackendHealthcheckOptions) Path(p string) *BackendHealthcheckOptions

Path 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

func (h *BackendHealthcheckOptions) Status(status uint32) *BackendHealthcheckOptions

Status sets the HTTP status code that signifies a healthy state.

Defaults to 200.

Parameters

status: uint32

Returns

Threshold

View source
func (h *BackendHealthcheckOptions) Threshold(threshold uint32) *BackendHealthcheckOptions

Threshold 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

func (h *BackendHealthcheckOptions) Timeout(t time.Duration) *BackendHealthcheckOptions

Timeout 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

t: time.Duration

Returns

func (h *BackendHealthcheckOptions) Window(w uint32) *BackendHealthcheckOptions

Window sets the number of most recent health check queries to keep. Must not be greater than 15.

Defaults to 5.

Parameters

w: uint32

Returns