class documentation

Resolver that applies simple string substitutions to results.

The resolver delegates to an underlying resolver and then replaces all occurrences of each key in substitutions with its corresponding value in the returned address string. This is intended for simple templating (for example replacing {domain}).

Parameters
substitutionsMapping of substrings to replace in the resolved address.
nextUnderlying resolver to obtain the initial address.
Method __init__ Undocumented
Method resolve Resolve via the underlying resolver and apply substitutions.
Instance Variable _next Undocumented
Instance Variable _substitutions Undocumented
def __init__(self, substitutions: dict[str, str], next: Resolver): (source)

Undocumented

def resolve(self, service_id: str) -> str: (source)

Resolve via the underlying resolver and apply substitutions.

Parameters
service_id:strService identifier to resolve.
Returns
strThe address after performing the configured replacements.
Raises
UnknownServiceErrorpropagated from the underlying resolver when it does not match the id.

Undocumented

_substitutions = (source)

Undocumented