#include <ngx_config.h>
#include <ngx_core.h>
#include <ngx_http.h>
static char *ngx_http_upstream_zone(ngx_conf_t *cf, ngx_command_t *cmd,
void *conf);
static ngx_int_t ngx_http_upstream_init_zone(ngx_shm_zone_t *shm_zone,
void *data);
static ngx_http_upstream_rr_peers_t *ngx_http_upstream_zone_copy_peers(
ngx_slab_pool_t *shpool, ngx_http_upstream_srv_conf_t *uscf,
ngx_http_upstream_srv_conf_t *ouscf);
static ngx_http_upstream_rr_peer_t *ngx_http_upstream_zone_copy_peer(
ngx_http_upstream_rr_peers_t *peers, ngx_http_upstream_rr_peer_t *src);
static ngx_int_t ngx_http_upstream_zone_preresolve(
ngx_http_upstream_rr_peer_t *resolve,
ngx_http_upstream_rr_peers_t *peers,
ngx_http_upstream_rr_peer_t *oresolve,
ngx_http_upstream_rr_peers_t *opeers);
static void ngx_http_upstream_zone_set_single(
ngx_http_upstream_srv_conf_t *uscf);
static void ngx_http_upstream_zone_remove_peer_locked(
ngx_http_upstream_rr_peers_t *peers, ngx_http_upstream_rr_peer_t *peer);
static ngx_int_t ngx_http_upstream_zone_init_worker(ngx_cycle_t *cycle);
static void ngx_http_upstream_zone_resolve_timer(ngx_event_t *event);
static void ngx_http_upstream_zone_resolve_handler(ngx_resolver_ctx_t *ctx);
static ngx_command_t ngx_http_upstream_zone_commands[] = …;
static ngx_http_module_t ngx_http_upstream_zone_module_ctx = …;
ngx_module_t ngx_http_upstream_zone_module = …;
static char *
ngx_http_upstream_zone(ngx_conf_t *cf, ngx_command_t *cmd, void *conf)
{ … }
static ngx_int_t
ngx_http_upstream_init_zone(ngx_shm_zone_t *shm_zone, void *data)
{ … }
static ngx_http_upstream_rr_peers_t *
ngx_http_upstream_zone_copy_peers(ngx_slab_pool_t *shpool,
ngx_http_upstream_srv_conf_t *uscf, ngx_http_upstream_srv_conf_t *ouscf)
{ … }
static ngx_http_upstream_rr_peer_t *
ngx_http_upstream_zone_copy_peer(ngx_http_upstream_rr_peers_t *peers,
ngx_http_upstream_rr_peer_t *src)
{ … }
static ngx_int_t
ngx_http_upstream_zone_preresolve(ngx_http_upstream_rr_peer_t *resolve,
ngx_http_upstream_rr_peers_t *peers,
ngx_http_upstream_rr_peer_t *oresolve,
ngx_http_upstream_rr_peers_t *opeers)
{ … }
static void
ngx_http_upstream_zone_set_single(ngx_http_upstream_srv_conf_t *uscf)
{ … }
static void
ngx_http_upstream_zone_remove_peer_locked(ngx_http_upstream_rr_peers_t *peers,
ngx_http_upstream_rr_peer_t *peer)
{ … }
static ngx_int_t
ngx_http_upstream_zone_init_worker(ngx_cycle_t *cycle)
{ … }
static void
ngx_http_upstream_zone_resolve_timer(ngx_event_t *event)
{ … }
#define ngx_http_upstream_zone_addr_marked(addr) …
#define ngx_http_upstream_zone_mark_addr(addr) …
#define ngx_http_upstream_zone_unmark_addr(addr) …
static void
ngx_http_upstream_zone_resolve_handler(ngx_resolver_ctx_t *ctx)
{ … }