BaseConfigBuilder

abstract class BaseConfigBuilder

Defines a builder for creating configured PolywrapClient instances with support for adding, removing, and modifying various configuration options.

Inheritors

Constructors

Link copied to clipboard
constructor()

Properties

Link copied to clipboard

Holds the current configuration being built.

Functions

Link copied to clipboard

Adds the given BuilderConfig to the current configuration.

Link copied to clipboard

Adds a Bundle to the current configuration.

Adds a NativeBundle from the FFI. Bundles defined in the FFI are always added to the final configuration before all other items, and therefore can be overwritten regardless of the order in which they are added.

Link copied to clipboard

Adds all default configuration Bundles to the current configuration.

Link copied to clipboard
inline fun <E> addEnv(env: Pair<String, E>): BaseConfigBuilder

Adds an environment variable with a specified URI key to the current configuration.

Link copied to clipboard
inline fun <E> addEnvs(envs: Map<String, E>): BaseConfigBuilder

Adds a set of environment variables with specified URI keys to the current configuration.

Link copied to clipboard
fun addInterfaceImplementation(interfaceUri: String, implementationUri: String): BaseConfigBuilder

Adds an interface implementation with the specified interface and implementation URIs.

Link copied to clipboard
fun addInterfaceImplementations(interfaceUri: String, implementationUris: List<String>): BaseConfigBuilder

Adds multiple interface implementations with the specified interface URI and a list of implementation URIs.

Link copied to clipboard

Adds a UriResolver to the current configuration.

Link copied to clipboard

Adds a list of UriResolver instances to the current configuration.

Link copied to clipboard
abstract fun build(): PolywrapClient

Builds a PolywrapClient instance with the current builder configuration and optional additional configuration specified through a builder DSL.

Link copied to clipboard

Removes an environment variable with the specified URI key from the current configuration.

Link copied to clipboard
fun removeInterfaceImplementation(interfaceUri: String, implementationUri: String): BaseConfigBuilder

Removes an interface implementation with the specified interface and implementation URIs.

Link copied to clipboard

Removes a package with the specified URI key from the current configuration.

Link copied to clipboard

Removes a redirect with the specified source URI.

Link copied to clipboard

Removes a wrapper with the specified URI key from the current configuration.

Link copied to clipboard
inline fun <E> setEnv(env: Pair<String, E>): BaseConfigBuilder

Sets or replaces an environment variable with a specified URI key in the current configuration.

Link copied to clipboard

Adds a package with a specified URI key to the current configuration.

Link copied to clipboard

Adds a set of packages with specified URI keys to the current configuration.

Link copied to clipboard

Adds a redirect with a specified source and destination URI.

Link copied to clipboard

Adds a set of redirects with specified source and destination URIs.

Link copied to clipboard

Adds a wrapper with a specified URI key to the current configuration.

Link copied to clipboard

Adds a set of wrappers with specified URI keys to the current configuration.