module documentation

Service address resolvers used by the SDK and generated clients.

This module defines a small composable resolver abstraction used to map a logical service identifier (for example the fully-qualified protobuf service name) to a concrete network address or address template used for routing RPCs.

Common usage patterns:

  • Single maps a single explicit id to an address.
  • Prefix maps any service id beginning with a prefix to an address.
  • Basic is a convenience factory that chooses Single or Prefix
    depending on whether the provided id ends with a *.
  • Constant always returns the same address regardless of id.
  • Conventional implements a convention-based mapping used by the SDK
    (parses service names like nebius.<service>...Service and returns <service>.{domain} by default; it also honors a protobuf extension named api_service_name when present).
  • Chain composes multiple resolvers and returns the first match.
  • Cached memoizes results from another resolver.
  • TemplateExpander applies simple string substitutions on resolved
    addresses (useful for replacing templated placeholders such as {domain}).

All resolvers implement Resolver and raise UnknownServiceError when a service id cannot be resolved.

Class Basic Convenience resolver that selects Single or Prefix.
Class Cached Memoizing resolver that caches results from another resolver.
Class Chain Compose several resolvers and return the first successful result.
Class Constant Resolver that always returns a fixed address.
Class Conventional Convention-based resolver for Nebius services.
Class Prefix Resolver that matches service ids by prefix.
Class Resolver Abstract resolver interface.
Class Single Resolver that matches a single explicit service id.
Class TemplateExpander Resolver that applies simple string substitutions to results.
Exception UnknownServiceError Raised when a resolver cannot map a service id to an address.
Variable log Undocumented

Undocumented