diff options
Diffstat (limited to 'src/nxt_router.h')
-rw-r--r-- | src/nxt_router.h | 34 |
1 files changed, 25 insertions, 9 deletions
diff --git a/src/nxt_router.h b/src/nxt_router.h index ffcad3b9..da3dc26f 100644 --- a/src/nxt_router.h +++ b/src/nxt_router.h @@ -12,24 +12,31 @@ #include <nxt_runtime.h> #include <nxt_main_process.h> -typedef struct nxt_http_request_s nxt_http_request_t; +typedef struct nxt_http_request_s nxt_http_request_t; #include <nxt_application.h> +typedef struct nxt_router_access_log_s nxt_router_access_log_t; + + typedef struct { - nxt_thread_spinlock_t lock; - nxt_queue_t engines; + nxt_thread_spinlock_t lock; + nxt_queue_t engines; - nxt_queue_t sockets; /* of nxt_socket_conf_t */ - nxt_queue_t apps; /* of nxt_app_t */ + nxt_queue_t sockets; /* of nxt_socket_conf_t */ + nxt_queue_t apps; /* of nxt_app_t */ + + nxt_router_access_log_t *access_log; } nxt_router_t; typedef struct { - uint32_t count; - uint32_t threads; - nxt_router_t *router; - nxt_mp_t *mem_pool; + uint32_t count; + uint32_t threads; + nxt_router_t *router; + nxt_mp_t *mem_pool; + + nxt_router_access_log_t *access_log; } nxt_router_conf_t; @@ -157,6 +164,15 @@ typedef struct { } nxt_socket_conf_joint_t; +struct nxt_router_access_log_s { + void (*handler)(nxt_task_t *task, nxt_http_request_t *r, + nxt_router_access_log_t *access_log); + nxt_fd_t fd; + nxt_str_t path; + uint32_t count; +}; + + 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_remove_pid_handler(nxt_task_t *task, nxt_port_recv_msg_t *msg); |