# Google Cloud Container V1 Client - Class HostConfig (2.10.0)

2.10.0 (latest) 2.9.0 2.8.1 2.7.0 2.6.1 2.5.0 2.4.0 2.3.4 2.2.1 2.1.0 2.0.0 1.33.0 1.32.0 1.31.0 1.30.3 1.24.0 1.23.0 1.22.0 1.21.1 1.20.0 1.19.0 1.18.0 1.17.1 1.16.0 1.15.0 1.14.0 1.13.1 1.12.1 1.10.3 1.9.1 Reference documentation and code samples for the Google Cloud Container V1 Client class HostConfig.

HostConfig configures the registry host under a given Server.

Generated from protobuf message `google.container.v1.ContainerdConfig.RegistryHostConfig.HostConfig`

## Namespace

Google \\ Cloud \\ Container \\ V1 \\ ContainerdConfig \\ RegistryHostConfig

## Methods

### __construct

Constructor.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `data` | `array` Optional. Data for populating the Message object. |
| `↳ host` | `string` Host configures the registry host/mirror. It supports fully qualified domain names (FQDNs) and IP addresses. Specifying scheme, port or path is supported. Scheme can only be http or https. Wildcards are NOT supported. Examples: - `my.customdomain.com` - `https://my.customdomain.com/path` - `10.0.1.2:5000` |
| `↳ capabilities` | `int[]` Capabilities represent the capabilities of the registry host, specifying what operations a host is capable of performing. If not set, containerd enables all capabilities by default. |
| `↳ override_path` | `bool` OverridePath is used to indicate the host's API root endpoint is defined in the URL path rather than by the API specification. This may be used with non-compliant OCI registries which are missing the /v2 prefix. If not set, containerd sets default false. |
| `↳ header` | `array<https://docs.cloud.google.com/php/docs/reference/cloud-container/latest/V1.ContainerdConfig.RegistryHostConfig.RegistryHeader>` Header configures the registry host headers. |
| `↳ ca` | `array<https://docs.cloud.google.com/php/docs/reference/cloud-container/latest/V1.ContainerdConfig.RegistryHostConfig.CertificateConfig>` CA configures the registry host certificate. |
| `↳ client` | `array<https://docs.cloud.google.com/php/docs/reference/cloud-container/latest/V1.ContainerdConfig.RegistryHostConfig.CertificateConfigPair>` Client configures the registry host client certificate and key. |
| `↳ dial_timeout` | `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/Duration` Specifies the maximum duration allowed for a connection attempt to complete. A shorter timeout helps reduce delays when falling back to the original registry if the mirror is unreachable. Maximum allowed value is 180s. If not set, containerd sets default 30s. The value should be a decimal number of seconds with an `s` suffix. |

### getHost

Host configures the registry host/mirror.

It supports fully qualified domain names (FQDNs) and IP addresses.
Specifying scheme, port or path is supported. Scheme can only be http
or https.
Wildcards are NOT supported.
Examples:

- `my.customdomain.com`
- `https://my.customdomain.com/path`
- `10.0.1.2:5000`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `string` |   |

### setHost

Host configures the registry host/mirror.

It supports fully qualified domain names (FQDNs) and IP addresses.
Specifying scheme, port or path is supported. Scheme can only be http
or https.
Wildcards are NOT supported.
Examples:

- `my.customdomain.com`
- `https://my.customdomain.com/path`
- `10.0.1.2:5000`

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `string` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |

### getCapabilities

Capabilities represent the capabilities of the registry host,
specifying what operations a host is capable of performing.

If not set, containerd enables all capabilities by default.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/RepeatedField<int>` |   |

### setCapabilities

Capabilities represent the capabilities of the registry host,
specifying what operations a host is capable of performing.

If not set, containerd enables all capabilities by default.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `int[]` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |

### getOverridePath

OverridePath is used to indicate the host's API root endpoint is
defined in the URL path rather than by the API specification. This may
be used with non-compliant OCI registries which are missing the /v2
prefix.

If not set, containerd sets default false.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `bool` |   |

### setOverridePath

OverridePath is used to indicate the host's API root endpoint is
defined in the URL path rather than by the API specification. This may
be used with non-compliant OCI registries which are missing the /v2
prefix.

If not set, containerd sets default false.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `bool` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |

### getHeader

Header configures the registry host headers.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/RepeatedField<https://docs.cloud.google.com/php/docs/reference/cloud-container/latest/V1.ContainerdConfig.RegistryHostConfig.RegistryHeader>` |   |

### setHeader

Header configures the registry host headers.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `array<https://docs.cloud.google.com/php/docs/reference/cloud-container/latest/V1.ContainerdConfig.RegistryHostConfig.RegistryHeader>` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |

### getCa

CA configures the registry host certificate.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/RepeatedField<https://docs.cloud.google.com/php/docs/reference/cloud-container/latest/V1.ContainerdConfig.RegistryHostConfig.CertificateConfig>` |   |

### setCa

CA configures the registry host certificate.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `array<https://docs.cloud.google.com/php/docs/reference/cloud-container/latest/V1.ContainerdConfig.RegistryHostConfig.CertificateConfig>` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |

### getClient

Client configures the registry host client certificate and key.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/RepeatedField<https://docs.cloud.google.com/php/docs/reference/cloud-container/latest/V1.ContainerdConfig.RegistryHostConfig.CertificateConfigPair>` |   |

### setClient

Client configures the registry host client certificate and key.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `array<https://docs.cloud.google.com/php/docs/reference/cloud-container/latest/V1.ContainerdConfig.RegistryHostConfig.CertificateConfigPair>` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |

### getDialTimeout

Specifies the maximum duration allowed for a connection attempt to
complete. A shorter timeout helps reduce delays when falling back to
the original registry if the mirror is unreachable.

Maximum allowed value is 180s. If not set, containerd sets default 30s.
The value should be a decimal number of seconds with an `s` suffix.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/Duration|null` |   |

### hasDialTimeout

### clearDialTimeout

### setDialTimeout

Specifies the maximum duration allowed for a connection attempt to
complete. A shorter timeout helps reduce delays when falling back to
the original registry if the mirror is unreachable.

Maximum allowed value is 180s. If not set, containerd sets default 30s.
The value should be a decimal number of seconds with an `s` suffix.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/Duration` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |