class documentation
class TemplateExpander(Resolver): (source)
Constructor: TemplateExpander(substitutions, next)
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 | |
| substitutions | Mapping of substrings to replace in the resolved address. |
| next | Underlying 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 |
overrides
nebius.base.resolver.Resolver.resolveResolve via the underlying resolver and apply substitutions.
| Parameters | |
servicestr | Service identifier to resolve. |
| Returns | |
str | The address after performing the configured replacements. |
| Raises | |
UnknownServiceError | propagated from the underlying resolver when it does not match the id. |