Class ServerHealthContext¶
- Defined in File request.h
Inheritance Relationships¶
Derived Types¶
public nvidia::inferenceserver::client::ServerHealthGrpcContext
(Class ServerHealthGrpcContext)public nvidia::inferenceserver::client::ServerHealthHttpContext
(Class ServerHealthHttpContext)
Class Documentation¶
-
class
ServerHealthContext
¶ A ServerHealthContext object is used to query an inference server for health information.
Once created a ServerHealthContext object can be used repeatedly to get health from the server. A ServerHealthContext object can use either HTTP protocol or gRPC protocol depending on the Create function (ServerHealthHttpContext::Create or ServerHealthGrpcContext::Create). For example:
std::unique_ptr<ServerHealthContext> ctx; ServerHealthHttpContext::Create(&ctx, "localhost:8000"); bool ready; ctx->GetReady(&ready); ... bool live; ctx->GetLive(&live); ...
- Note
- ServerHealthContext::Create methods are thread-safe. GetReady() and GetLive() are not thread-safe. For a given ServerHealthContext, calls to GetReady() and GetLive() must be serialized.
Subclassed by nvidia::inferenceserver::client::ServerHealthGrpcContext, nvidia::inferenceserver::client::ServerHealthHttpContext
Public Functions
Protected Functions
-
ServerHealthContext
(bool)¶
Protected Attributes
-
const bool
verbose_
¶