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

Used for configuring the SDKs service URLs.

The default behavior, if you do not change any of these properties, is that the SDK will connect to the standard endpoints in the LaunchDarkly production service. There are several use cases for changing these properties:

Examples

Configure for a Relay Proxy instance.

    ConfigBuilder::new("sdk-key").service_endpoints(ServiceEndpointsBuilder::new()
        .relay_proxy("http://my-relay-hostname:8080"));

Configure for a private LaunchDarkly instance.

   ConfigBuilder::new("sdk-key").service_endpoints(ServiceEndpointsBuilder::new()
        .polling_base_url("https://sdk.my-private-instance.com")
        .streaming_base_url("https://stream.my-private-instance.com")
        .events_base_url("https://events.my-private-instance.com"));

Implementations§

Create a new instance of ServiceEndpointsBuilder with no URLs specified.

Sets a custom base URL for the polling service.

Sets a custom base URL for the streaming service.

Sets a custom base URI for the events service.

Specifies a single base URL for a Relay Proxy instance.

Called internally by the SDK to create a configuration instance. Applications do not need to call this method.

Errors

When using custom endpoints it is important that all of the URLs are set. If some URLs are set, but others are not, then this will return an error. If no URLs are set, then the default values will be used. This prevents a combination of custom and default values from being used.

Trait Implementations§

Returns a copy of the value. Read more
Performs copy-assignment from source. Read more
Returns the “default value” for a type. Read more

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.

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Instruments this type with the current Span, returning an Instrumented wrapper. Read more

Calls U::from(self).

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

The alignment of pointer.
The type for initializers.
Initializes a with the given initializer. Read more
Dereferences the given pointer. Read more
Mutably dereferences the given pointer. Read more
Drops the object pointed to by the given pointer. Read more
Should always be Self
The resulting type after obtaining ownership.
Creates owned data from borrowed data, usually by cloning. Read more
Uses borrowed data to replace owned data, usually by cloning. Read more
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.
Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more