---
title: BackendHealthcheckOptions
url: https://www.fastly.com/documentation/reference/compute/sdks/go/compute-sdk-go/fsthttp/struct.BackendHealthcheckOptions/
---

**Kind:** Struct  
**Module:** [fsthttp](https://www.fastly.com/documentation/reference/compute/sdks/go/compute-sdk-go/fsthttp/)  
**Package:** compute-sdk-go v1.11.0  
**Source:** https://github.com/fastly/compute-sdk-go/blob/d6bf71b04516ed72d6018cab6fff701a865f86e5/fsthttp/backend.go#L512

```go
type BackendHealthcheckOptions struct {
	// contains filtered or unexported fields
}
```

## Methods

### Initial

**Source:** https://github.com/fastly/compute-sdk-go/blob/d6bf71b04516ed72d6018cab6fff701a865f86e5/fsthttp/backend.go#L644

```go
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**

`*BackendHealthcheckOptions`

### Interval

**Source:** https://github.com/fastly/compute-sdk-go/blob/d6bf71b04516ed72d6018cab6fff701a865f86e5/fsthttp/backend.go#L547

```go
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**

`*BackendHealthcheckOptions`

### Method

**Source:** https://github.com/fastly/compute-sdk-go/blob/d6bf71b04516ed72d6018cab6fff701a865f86e5/fsthttp/backend.go#L573

```go
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**

`*BackendHealthcheckOptions`

### Path

**Source:** https://github.com/fastly/compute-sdk-go/blob/d6bf71b04516ed72d6018cab6fff701a865f86e5/fsthttp/backend.go#L586

```go
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**

`*BackendHealthcheckOptions`

### Status

**Source:** https://github.com/fastly/compute-sdk-go/blob/d6bf71b04516ed72d6018cab6fff701a865f86e5/fsthttp/backend.go#L599

```go
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**

`*BackendHealthcheckOptions`

### Threshold

**Source:** https://github.com/fastly/compute-sdk-go/blob/d6bf71b04516ed72d6018cab6fff701a865f86e5/fsthttp/backend.go#L630

```go
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**

`*BackendHealthcheckOptions`

### Timeout

**Source:** https://github.com/fastly/compute-sdk-go/blob/d6bf71b04516ed72d6018cab6fff701a865f86e5/fsthttp/backend.go#L561

```go
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**

`*BackendHealthcheckOptions`

### Window

**Source:** https://github.com/fastly/compute-sdk-go/blob/d6bf71b04516ed72d6018cab6fff701a865f86e5/fsthttp/backend.go#L608

```go
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**

`*BackendHealthcheckOptions`
