diff options
author | Max Romanov <max.romanov@nginx.com> | 2017-07-12 20:32:16 +0300 |
---|---|---|
committer | Max Romanov <max.romanov@nginx.com> | 2017-07-12 20:32:16 +0300 |
commit | b0c1e740cf404f8fed5eed75fddb205ca74314e0 (patch) | |
tree | 08dcefc827c5dfb1570b682ea8d1e9abf17a31dc /src/nxt_router.h | |
parent | c38bcb7d70729434893ae4d5f2f58a78a36d2bd5 (diff) | |
download | unit-b0c1e740cf404f8fed5eed75fddb205ca74314e0.tar.gz unit-b0c1e740cf404f8fed5eed75fddb205ca74314e0.tar.bz2 |
New process port exchange changed. READY message type introduced.
Application process start request DATA message from router to master.
Master notifies router via NEW_PORT message after worker process become ready.
Diffstat (limited to 'src/nxt_router.h')
-rw-r--r-- | src/nxt_router.h | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/src/nxt_router.h b/src/nxt_router.h index 99e70559..76977438 100644 --- a/src/nxt_router.h +++ b/src/nxt_router.h @@ -20,6 +20,8 @@ typedef struct { nxt_queue_t sockets; /* of nxt_socket_conf_t */ nxt_queue_t apps; /* of nxt_app_t */ + + nxt_lvlhsh_t start_workers; /* stream to nxt_start_worker_t */ } nxt_router_t; @@ -61,9 +63,13 @@ typedef struct { } nxt_router_temp_conf_t; -typedef struct { +typedef struct nxt_app_module_s nxt_app_module_t; +typedef struct nxt_app_s nxt_app_t; + +struct nxt_app_s { nxt_thread_mutex_t mutex; nxt_queue_t ports; + nxt_queue_t requests; /* of nxt_req_conn_link_t */ nxt_str_t name; uint32_t workers; @@ -75,7 +81,8 @@ typedef struct { nxt_queue_link_t link; nxt_str_t conf; -} nxt_app_t; + nxt_app_module_t *module; +}; typedef struct { @@ -111,7 +118,9 @@ typedef struct { } nxt_socket_conf_joint_t; +void nxt_router_new_port_handler(nxt_task_t *task, nxt_port_recv_msg_t *msg); void nxt_router_conf_data_handler(nxt_task_t *task, nxt_port_recv_msg_t *msg); +void nxt_router_app_remove_port(nxt_port_t *port); #endif /* _NXT_ROUTER_H_INCLUDED_ */ |