class documentation

Channel that proxies requests to a single constant method.

Parameters
methodthe fully-qualified method name (service.method) to route to
sourcean existing ClientChannelInterface that performs the actual channel operations (authorization, pooling, etc.)
parent_idoptional parent id to override the source's parent id
Method __init__ Initialize the constant channel.
Method discard_channel Discard an address channel previously acquired from the source.
Method get_authorization_provider Return the authorization provider used by the underlying source channel (if any).
Method get_channel_by_method Resolve an address channel by method name.
Method parent_id Return the effective parent id for this constant channel.
Method return_channel Return a previously-acquired address channel to the source.
Method run_sync Synchronously run an awaitable using the source channel's synchronization helper.
Instance Variable _method Undocumented
Instance Variable _parent_id Undocumented
Instance Variable _source Undocumented
def __init__(self, method: str, source: ClientChannelInterface, parent_id: str | None = None): (source)

Initialize the constant channel.

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

Discard an address channel previously acquired from the source.

This forwards to the wrapped source channel's discard_channel.

Parameters
chan:AddressChannel or Nonethe channel to discard
def get_authorization_provider(self) -> AuthorizationProvider | None: (source)

Return the authorization provider used by the underlying source channel (if any).

Returns
AuthorizationProvider | NoneAuthorizationProvider or None
def get_channel_by_method(self, method_name: str) -> AddressChannel: (source)

Resolve an address channel by method name.

The provided method_name is ignored; this implementation always returns the address channel associated with the constant method provided at construction time.

Parameters
method_name:strignored
Returns
AddressChannelan AddressChannel for the constant method
def parent_id(self) -> str | None: (source)

Return the effective parent id for this constant channel.

If a parent id was provided to the constructor it is returned; otherwise the source channel's parent id is used.

Returns
str | Nonethe parent id str or None
def return_channel(self, chan: AddressChannel | None): (source)

Return a previously-acquired address channel to the source.

This forwards to the wrapped source channel's return_channel.

Parameters
chan:AddressChannel or Nonethe channel to return
def run_sync(self, awaitable: Awaitable[T], timeout: float | None = None) -> T: (source)

Synchronously run an awaitable using the source channel's synchronization helper.

Parameters
awaitable:Awaitable[T]an awaitable to execute
timeout:float or Noneoptional timeout forwarded to the source implementation
Returns
Tthe awaitable result

Undocumented

_parent_id = (source)

Undocumented

Undocumented