tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mt...@apache.org
Subject cvs commit: jakarta-tomcat-connectors/ajp/proxy mod_proxy.h
Date Wed, 04 Aug 2004 08:12:08 GMT
mturk       2004/08/04 01:12:08

  Modified:    ajp/proxy mod_proxy.h
  Log:
  Add pre_request and post_request proxy hooks.
  They will be mainly used for loadbalancers for finding and maintaining workers.
  
  Revision  Changes    Path
  1.9       +30 -0     jakarta-tomcat-connectors/ajp/proxy/mod_proxy.h
  
  Index: mod_proxy.h
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat-connectors/ajp/proxy/mod_proxy.h,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -u -r1.8 -r1.9
  --- mod_proxy.h	4 Aug 2004 06:51:00 -0000	1.8
  +++ mod_proxy.h	4 Aug 2004 08:12:08 -0000	1.9
  @@ -249,6 +249,14 @@
   #endif
   };
   
  +/* data structure for set/get module_config */
  +typedef struct {
  +    char                  *url;         /* rewtitten url */
  +    struct proxy_balancer *balancer;    /* load balancer to use */
  +    proxy_worker          *worker;      /* most suitable worker */
  +    void                  *opaque;      /* module private data */
  +} proxy_module_conf;
  +
   /* hooks */
   
   /* Create a set of PROXY_DECLARE(type), PROXY_DECLARE_NONSTD(type) and 
  @@ -287,6 +295,28 @@
   
   APR_DECLARE_EXTERNAL_HOOK(proxy, PROXY, int, create_req, (request_rec *r, request_rec *pr))
   APR_DECLARE_EXTERNAL_HOOK(proxy, PROXY, int, fixups, (request_rec *r)) 
  +
  +/**
  + * pre request hook.
  + * It will return the most suitable worker at the moment
  + * and coresponding balancer.
  + * The url is rewritten from balancer://cluster/uri to scheme://host:port/uri
  + * and then the scheme_handler is called.
  + *
  + */
  +APR_DECLARE_EXTERNAL_HOOK(proxy, PROXY, int, pre_request, (proxy_worker **worker,
  +                          struct proxy_balancer **balancer,
  +                          request_rec *r, 
  +                          proxy_server_conf *conf, char **url,                        
 
  +                          const char *proxyhost, apr_port_t proxyport))
  +/**
  + * post request hook.
  + * It is called after request for updating runtime balancer status.
  + */
  +APR_DECLARE_EXTERNAL_HOOK(proxy, PROXY, int, post_request, (proxy_worker *worker,
  +                          struct proxy_balancer *balancer, request_rec *r,
  +                          proxy_server_conf *conf))
  +
   
   /* proxy_util.c */
   
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-dev-help@jakarta.apache.org


Mime
View raw message