Class ServerStatusContext

Class Documentation

class ServerStatusContext

A ServerStatusContext object is used to query an inference server for status information, including information about the models available on that server.

Once created a ServerStatusContext object can be used repeatedly to get status from the server. A ServerStatusContext object can use either HTTP protocol or GRPC protocol depending on the Create function (ServerStatusHttpContext::Create or ServerStatusGrpcContext::Create). For example:

std::unique_ptr<ServerStatusContext> ctx;
ServerStatusHttpContext::Create(&ctx, "localhost:8000");
ServerStatus status;


ServerStatusContext::Create methods are thread-safe. GetServerStatus() is not thread-safe. For a given ServerStatusContext, calls to GetServerStatus() must be serialized.

Public Functions

virtual ~ServerStatusContext() = 0
virtual Error GetServerStatus(ServerStatus *status) = 0

Contact the inference server and get status.


Error object indicating success or failure of the request.

  • status: Returns the status.