#include <http_server.h>
Public Member Functions | |
| HttpServer () | |
| ~HttpServer () | |
| absl::Status | Start (int port) |
| void | Stop () |
| bool | IsRunning () const |
Private Member Functions | |
| void | RunServer (int port) |
| void | RegisterRoutes () |
Private Attributes | |
| std::unique_ptr< httplib::Server > | server_ |
| std::unique_ptr< std::thread > | server_thread_ |
| std::atomic< bool > | is_running_ {false} |
Definition at line 20 of file http_server.h.
| yaze::cli::api::HttpServer::HttpServer | ( | ) |
Definition at line 16 of file http_server.cc.
| yaze::cli::api::HttpServer::~HttpServer | ( | ) |
Definition at line 18 of file http_server.cc.
References Stop().

| absl::Status yaze::cli::api::HttpServer::Start | ( | int | port | ) |
Definition at line 22 of file http_server.cc.
References is_running_, LOG_ERROR, LOG_INFO, RegisterRoutes(), server_, and server_thread_.

| void yaze::cli::api::HttpServer::Stop | ( | ) |
Definition at line 51 of file http_server.cc.
References is_running_, LOG_INFO, server_, and server_thread_.
Referenced by ~HttpServer().
| bool yaze::cli::api::HttpServer::IsRunning | ( | ) | const |
Definition at line 63 of file http_server.cc.
References is_running_.
|
private |
|
private |
Definition at line 67 of file http_server.cc.
References yaze::cli::api::HandleHealth(), yaze::cli::api::HandleListModels(), and server_.
Referenced by Start().

|
private |
Definition at line 38 of file http_server.h.
Referenced by RegisterRoutes(), Start(), and Stop().
|
private |
Definition at line 39 of file http_server.h.
|
private |
Definition at line 40 of file http_server.h.
Referenced by IsRunning(), Start(), and Stop().