• Home
  • Raw
  • Download

Lines Matching refs:shared_addr

89 create_downstream_key(const std::shared_ptr<SharedDownstreamAddr> &shared_addr,  in create_downstream_key()  argument
94 addrs.resize(shared_addr->addrs.size()); in create_downstream_key()
96 for (auto &a : shared_addr->addrs) { in create_downstream_key()
114 std::get<1>(dkey) = shared_addr->redirect_if_not_tls; in create_downstream_key()
116 auto &affinity = shared_addr->affinity; in create_downstream_key()
121 auto &timeout = shared_addr->timeout; in create_downstream_key()
209 auto &shared_addr = g->shared_addr; in replace_downstream_config() local
210 for (auto &addr : shared_addr->addrs) { in replace_downstream_config()
240 auto shared_addr = std::make_shared<SharedDownstreamAddr>(); in replace_downstream_config() local
242 shared_addr->addrs.resize(src.addrs.size()); in replace_downstream_config()
243 shared_addr->affinity.type = src.affinity.type; in replace_downstream_config()
245 shared_addr->affinity.cookie.name = in replace_downstream_config()
246 make_string_ref(shared_addr->balloc, src.affinity.cookie.name); in replace_downstream_config()
248 shared_addr->affinity.cookie.path = in replace_downstream_config()
249 make_string_ref(shared_addr->balloc, src.affinity.cookie.path); in replace_downstream_config()
251 shared_addr->affinity.cookie.secure = src.affinity.cookie.secure; in replace_downstream_config()
253 shared_addr->affinity_hash = src.affinity_hash; in replace_downstream_config()
254 shared_addr->redirect_if_not_tls = src.redirect_if_not_tls; in replace_downstream_config()
255 shared_addr->timeout.read = src.timeout.read; in replace_downstream_config()
256 shared_addr->timeout.write = src.timeout.write; in replace_downstream_config()
260 auto &dst_addr = shared_addr->addrs[j]; in replace_downstream_config()
263 dst_addr.host = make_string_ref(shared_addr->balloc, src_addr.host); in replace_downstream_config()
265 make_string_ref(shared_addr->balloc, src_addr.hostport); in replace_downstream_config()
269 dst_addr.group = make_string_ref(shared_addr->balloc, src_addr.group); in replace_downstream_config()
273 dst_addr.sni = make_string_ref(shared_addr->balloc, src_addr.sni); in replace_downstream_config()
279 auto shared_addr_ptr = shared_addr.get(); in replace_downstream_config()
298 shared_addr->mruby_ctx = mruby::create_mruby_context(src.mruby_file); in replace_downstream_config()
299 assert(shared_addr->mruby_ctx); in replace_downstream_config()
300 shared_mruby_ctxs.emplace(src.mruby_file, shared_addr->mruby_ctx); in replace_downstream_config()
302 shared_addr->mruby_ctx = (*mruby_ctx_it).second; in replace_downstream_config()
309 auto dkey = create_downstream_key(shared_addr, src.mruby_file); in replace_downstream_config()
313 std::shuffle(std::begin(shared_addr->addrs), std::end(shared_addr->addrs), in replace_downstream_config()
317 for (auto &addr : shared_addr->addrs) { in replace_downstream_config()
322 if (shared_addr->affinity.type == SessionAffinity::NONE) { in replace_downstream_config()
325 for (auto &addr : shared_addr->addrs) { in replace_downstream_config()
332 shared_addr->wgs = std::vector<WeightGroup>(num_wgs); in replace_downstream_config()
334 for (auto &addr : shared_addr->addrs) { in replace_downstream_config()
337 wg = &shared_addr->wgs[--num_wgs]; in replace_downstream_config()
350 shared_addr->pq.push( in replace_downstream_config()
356 dst->shared_addr = shared_addr; in replace_downstream_config()
365 dst->shared_addr = g->shared_addr; in replace_downstream_config()