![]() |
LINE Solver (C++)
Templated C++ port of the LINE queueing solver
|
Functions | |
| int | allocate (int offset) |
| Host port for a given offset within the LINE block. | |
| std::string | default_url (int port) |
| Base URL a service published on port of localhost is reachable at. | |
| std::string | lqns_default_url () |
| Default LqnsOptions::remote_url. | |
| bool | is_healthy (const std::string &base) |
| True when <base>/api/v1/health answers 2xx. | |
| bool | is_lqns_service (const std::string &base) |
| True when /api/v1/info lists a tool named lqns. | |
| std::string | resolve_lqns_url (const std::string &configured) |
| URL the SolverLQNS remote path posts to, given LqnsOptions::remote_url. | |
Variables | |
| constexpr int | BLOCK_FIRST = 29200 |
| First host port of the reserved block. | |
| constexpr int | BLOCK_LAST = 29229 |
| Last host port of the reserved block. | |
| constexpr int | CONTAINER_PORT = 8080 |
| Port every service image listens on inside its container. | |
| constexpr int | LEGACY_PORT = 8080 |
| Host port every service used before the allocation; a verified fallback only. | |
| constexpr int | JMT_PORT = BLOCK_FIRST + 1 |
| imperialqore/jmt-rest. | |
| constexpr int | LQNS_PORT = BLOCK_FIRST + 2 |
| imperialqore/line-lqns-rest (lqns, lqsim and qnsolver share the image). | |
| constexpr int | LDES_PORT = BLOCK_FIRST + 3 |
| imperialqore/ldes-rest. | |
| constexpr int | SAGE_PORT = BLOCK_FIRST + 4 |
| imperialqore/line-sage-rest. | |
|
inline |
Host port for a given offset within the LINE block.
Definition at line 48 of file line_ports.h.
References allocate(), BLOCK_FIRST, and BLOCK_LAST.
Referenced by allocate().
|
inline |
Base URL a service published on port of localhost is reachable at.
Definition at line 67 of file line_ports.h.
References default_url().
Referenced by default_url(), lqns_default_url(), and resolve_lqns_url().
|
inline |
True when <base>/api/v1/health answers 2xx.
Definition at line 82 of file line_ports.h.
References line::http::get(), is_healthy(), and line::http::Response::status.
Referenced by is_healthy(), and resolve_lqns_url().
|
inline |
True when /api/v1/info lists a tool named lqns.
Identity is read, not assumed from the port: a line-sage-rest started by hand on 8080 answers /health just as an lqns-rest does.
Definition at line 97 of file line_ports.h.
References line::http::Response::body, line::http::get(), is_lqns_service(), and line::http::Response::status.
Referenced by is_lqns_service(), and resolve_lqns_url().
|
inline |
Default LqnsOptions::remote_url.
Definition at line 70 of file line_ports.h.
References default_url(), lqns_default_url(), and LQNS_PORT.
Referenced by lqns_default_url(), and resolve_lqns_url().
|
inline |
URL the SolverLQNS remote path posts to, given LqnsOptions::remote_url.
A URL other than the default is used exactly as given. The default is used when it answers; otherwise an lqns-rest still published on the legacy port 8080, verified through /api/v1/info, is used with a warning telling the user to republish it. When neither answers the default is returned, so the request fails naming the URL the service is expected at.
Definition at line 123 of file line_ports.h.
References CONTAINER_PORT, default_url(), is_healthy(), is_lqns_service(), LEGACY_PORT, lqns_default_url(), LQNS_PORT, and resolve_lqns_url().
Referenced by resolve_lqns_url().
|
constexpr |
First host port of the reserved block.
Definition at line 39 of file line_ports.h.
Referenced by allocate().
|
constexpr |
Last host port of the reserved block.
Definition at line 41 of file line_ports.h.
Referenced by allocate().
|
constexpr |
Port every service image listens on inside its container.
Definition at line 43 of file line_ports.h.
Referenced by resolve_lqns_url().
|
constexpr |
imperialqore/jmt-rest.
Definition at line 58 of file line_ports.h.
|
constexpr |
imperialqore/ldes-rest.
Definition at line 62 of file line_ports.h.
|
constexpr |
Host port every service used before the allocation; a verified fallback only.
Definition at line 45 of file line_ports.h.
Referenced by resolve_lqns_url(), and line::sym::sym_probe_ports().
|
constexpr |
imperialqore/line-lqns-rest (lqns, lqsim and qnsolver share the image).
Definition at line 60 of file line_ports.h.
Referenced by lqns_default_url(), and resolve_lqns_url().
|
constexpr |
imperialqore/line-sage-rest.
Definition at line 64 of file line_ports.h.
Referenced by line::sym::sym_probe_ports().