class documentation

Resolver that applies simple string substitutions to results.

The underlying resolver returns an address. This resolver replaces each key in substitutions with its value. Use it for simple templates such as {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