summaryrefslogtreecommitdiffhomepage
path: root/src/nxt_router.h
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/nxt_router.h24
1 files changed, 24 insertions, 0 deletions
diff --git a/src/nxt_router.h b/src/nxt_router.h
index a7fb54a9..ff5a7c41 100644
--- a/src/nxt_router.h
+++ b/src/nxt_router.h
@@ -11,6 +11,7 @@
#include <nxt_main.h>
#include <nxt_runtime.h>
#include <nxt_master_process.h>
+#include <nxt_application.h>
typedef struct {
@@ -18,6 +19,7 @@ typedef struct {
nxt_queue_t engines;
nxt_queue_t sockets; /* of nxt_socket_conf_t */
+ nxt_queue_t apps; /* of nxt_app_t */
} nxt_router_t;
@@ -45,6 +47,9 @@ typedef struct {
nxt_queue_t keeping; /* of nxt_socket_conf_t */
nxt_queue_t deleting; /* of nxt_socket_conf_t */
+ nxt_queue_t apps; /* of nxt_app_t */
+ nxt_queue_t previous; /* of nxt_app_t */
+
uint32_t new_threads;
nxt_array_t *engines;
@@ -54,6 +59,23 @@ typedef struct {
typedef struct {
+ nxt_thread_mutex_t mutex;
+ nxt_queue_t ports;
+ nxt_str_t name;
+
+ uint32_t workers;
+ uint32_t max_workers;
+
+ nxt_app_type_t type:8;
+ uint8_t live; /* 1 bit */
+
+ nxt_queue_link_t link;
+
+ nxt_str_t conf;
+} nxt_app_t;
+
+
+typedef struct {
uint32_t count;
nxt_socket_t fd;
} nxt_router_socket_t;
@@ -66,6 +88,8 @@ typedef struct {
nxt_router_conf_t *router_conf;
nxt_sockaddr_t *sockaddr;
+ nxt_app_t *application;
+
nxt_listen_socket_t listen;
size_t header_buffer_size;