jina.peapods.networking module

jina.peapods.networking.is_remote_local_connection(first, second)[source]

Decides, whether first is remote host and second is localhost

Parameters
  • first (str) – the ip or host name of the first runtime

  • second (str) – the ip or host name of the second runtime

Returns

True, if first is remote and second is local

jina.peapods.networking.get_connect_host(bind_host, bind_expose_public, connect_args)[source]

Compute the host address for connect_args

Parameters
  • bind_host (str) – the ip for binding

  • bind_expose_public (bool) – True, if bind socket should be exposed publicly

  • connect_args (Namespace) – configuration for the host ip connection

Return type

str

Returns

host ip