Connecting to Ray services

All the Ray services expose an API via IPC that can be called by any other services or applications. To learn more about services, please have a look at https://www.chromium.org/developers/design-documents/mojo and https://github.com/amplab/ray-core/tree/master/src/docs.

template <typename Service>
class shell::ClientContext

The ClientContext is used to connect a client to a Ray service. The “Service” template parameter is the service class generated by mojom for this service (for example mojo::examples::Echo for the Mojo “echo” example).

Public Functions

void ConnectToShell(const std::string &service_name, const std::string &address)

Connect this client context to the Ray shell.

Parameters
  • service_name -

    The name of the service you want to connect to

  • address -

    The address to the shell socket

mojo::SynchronousInterfacePtr<Service> GetInterface()

Get the Mojo Interface pointer for this connection.