server: minor tweaks to use more cpp features (#23785)
* misc(server): add default port to impl RAII * misc(server): register_gcp_compat() can be const * misc(server): use proper cpp const/auto methods * misc(server): do not reset a unique_ptr, use make_unique instead to be exception safe
This commit is contained in:
@@ -73,7 +73,7 @@ struct server_http_context {
|
||||
|
||||
std::string path_prefix;
|
||||
std::string hostname;
|
||||
int port;
|
||||
int port = 8080;
|
||||
bool is_ssl = false;
|
||||
|
||||
server_http_context();
|
||||
@@ -88,7 +88,7 @@ struct server_http_context {
|
||||
|
||||
// Register the Google Cloud Platform (Vertex AI) compat (AIP_PREDICT_ROUTE env var, or /predict)
|
||||
// Must be called AFTER all other API routes are registered
|
||||
void register_gcp_compat();
|
||||
void register_gcp_compat() const;
|
||||
|
||||
// for debugging
|
||||
std::string listening_address;
|
||||
|
||||
Reference in New Issue
Block a user