Round robin upstream added.

This commit is contained in:
Igor Sysoev
2020-03-06 18:28:54 +03:00
parent 794248090a
commit 7935ea4543
11 changed files with 654 additions and 34 deletions

View File

@@ -1634,6 +1634,11 @@ nxt_router_conf_create(nxt_task_t *task, nxt_router_temp_conf_t *tmcf,
tmcf->router_conf->routes = routes;
}
ret = nxt_upstreams_create(task, tmcf, conf);
if (nxt_slow_path(ret != NXT_OK)) {
return ret;
}
http = nxt_conf_get_path(conf, &http_path);
#if 0
if (http == NULL) {
@@ -2526,6 +2531,7 @@ nxt_router_engine_joints_create(nxt_router_temp_conf_t *tmcf,
nxt_router_engine_conf_t *recf, nxt_queue_t *sockets,
nxt_work_handler_t handler)
{
nxt_int_t ret;
nxt_joint_job_t *job;
nxt_queue_link_t *qlk;
nxt_socket_conf_t *skcf;
@@ -2559,6 +2565,11 @@ nxt_router_engine_joints_create(nxt_router_temp_conf_t *tmcf,
job->work.data = joint;
ret = nxt_upstreams_joint_create(tmcf, &joint->upstreams);
if (nxt_slow_path(ret != NXT_OK)) {
return ret;
}
joint->count = 1;
skcf = nxt_queue_link_data(qlk, nxt_socket_conf_t, link);