pub struct BackendBuilder { /* private fields */ }
Expand description

A builder structure for generating a dynamic backend.

This structure can be constructed using either BackendExt::builder() or its own new() method, and will generate a new backend for use by the program after consuming the BackendBuilder with finish().

Implementations

Create a new dynamic backend builder.

The arguments are the name of the new backend to use, along with a string describing the backend host. The latter can be of the form:

  • "<ip address>"
  • "<hostname>"
  • "<ip address>:<port>"
  • "<hostname>:<port>"

The name can be whatever you would like, as long as it does not match the name of any of the static service backends nor match any other dynamic backends built during this session. (Names can overlap between different sessions of the same service – they will be treated as completely separate entities and will not be pooled – but you cannot, for example, declare a dynamic backend named “dynamic-backend” twice in the same session.)

The builder will start with default values for all other possible fields for the backend, which can be overridden using the other methods provided. Call finish() to complete the construction of the dynamic backend.

Dynamic backends must be enabled for this Compute@Edge service.

Set a host header override when contacting this backend. (To be completely explicit, this will force the value of the “Host” header to the given string when sending out the origin request.)

Set the connection timeout for this backend. Defaults to 1,000ms (1s).

Set a timeout that applies between the time of connection and the time we get the first byte back. Defaults to 15,000ms (15s).

Set a timeout that applies between any two bytes we receive across the wire. Defaults to 10,000ms (10s).

Use SSL/TLS to connect to the backend.

Disable SSL/TLS for this backend.

Set the minimum TLS version for connecting to the backend. Setting this will enable SSL for the connection as a side effect.

Set the maximum TLS version for connecting to the backend. Setting this will enable SSL for the connection as a side effect.

Define the hostname that the server certificate should declare, and turn on validation during backend connections. You should enable this if you are using SSL/TLS, and setting this will enable SSL for the connection as a side effect.

Set the CA certificate to use when checking the validity of the backend. Setting this will enable SSL for the connection as a side effect.

Set the acceptable cipher suites to use for an SSL connection. Setting this will enable SSL for the connection as a side effect.

Set the SNI hostname for the backend connection. Setting this will enable SSL for the connection as a side effect.

Attempt to register this backend with runtime, returning the backend for use like any other backends.

In the case that this function returns BackendCreationError::NameInUse, users can use Backend::from_str as per normal to create a reference to that version. (That being said, you should be careful to only use this capability in situations in which you are 100% sure that this name will always lead to the same place.)

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Should always be Self
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.