class documentation

class ClientChannelInterface(Protocol): (source)

Known subclasses: nebius.aio.constant_channel.Constant

View In Hierarchy

Protocol describing the minimal channel operations required by SDK clients.

Typical implementations are nebius.aio.channel.Channel or simple test doubles that provide access to transport channels and authorization providers.

Method discard_channel Discard an AddressChannel, ensuring the underlying transport is closed and not reused.
Method get_authorization_provider Get the configured AuthorizationProvider or None.
Method get_channel_by_method Obtain an AddressChannel for the specified RPC method.
Method parent_id Get the default parent id applied to some requests, or None if none was configured.
Method return_channel Return an AddressChannel previously obtained from the channel back to the pool for reuse.
Method run_sync Run an awaitable synchronously using the channel's configured event loop and return the result.
def discard_channel(self, chan: AddressChannel | None): (source)

Discard an AddressChannel, ensuring the underlying transport is closed and not reused.

def get_authorization_provider(self) -> AuthorizationProvider | None: (source)

Get the configured AuthorizationProvider or None.

def get_channel_by_method(self, method_name: str) -> AddressChannel: (source)

Obtain an AddressChannel for the specified RPC method.

Parameters
method_name:strFully-qualified RPC method name ('/pkg.Service/Method').
Returns
AddressChannelAn AddressChannel for the resolved address.
def parent_id(self) -> str | None: (source)

Get the default parent id applied to some requests, or None if none was configured.

def return_channel(self, chan: AddressChannel | None): (source)

Return an AddressChannel previously obtained from the channel back to the pool for reuse.

def run_sync(self, awaitable: Awaitable[T], timeout: float | None = None) -> T: (source)

Run an awaitable synchronously using the channel's configured event loop and return the result.