class documentation

Abstract resolver interface.

Implementations map service_id to an address. The ID is usually a fully qualified Protocol Buffers service name. An implementation must raise UnknownServiceError if it does not match the ID. Use Chain to try multiple resolvers.

The returned address is typically a hostname or an address template (for example service.{domain}) which may be further processed by higher-level code.

Method resolve Return the resolved address for service_id.
@abstractmethod
def resolve(self, service_id: str) -> str: (source) ΒΆ

Return the resolved address for service_id.

Raise UnknownServiceError if the resolver does not apply.

Parameters
service_id:strLogical service identifier to resolve.
Returns
strAddress string or template.
Raises
UnknownServiceErrorwhen the resolver does not match.