Re: Plugin lifecycle API - TS-1487, TS-2035

2013-07-17 Thread Alan M. Carroll
I was requested to provide the API that would go with this fix. Here is the 
preliminary version. If any one has suggestions for better names, speak up.

  /** Plugin lifecycle hooks.

  These are called during lifecycle events of a plugin. They
  should be set in the plugin initialization function.

  TS_PLUGIN_PROXY_READY_HOOK - called once, after the HTTP proxy
  port data structures have been initialized. In particular, SSL
  related calls that depend on accept endpoints may be
  invoked. After this hook is finished, the proxy port sockets are
  opened and connections are accepted.

  TS_PLUGIN_CACHE_READY_HOOK - called once, after the cache is
  fully initialized and online.
  
   */
  typedef enum
  {
TS_PLUGIN_PROXY_READY_HOOK,
TS_PLUGIN_CACHE_READY_HOOK,
TS_PLUGIN_LAST_HOOK
  } TSPluginHookID;

  /* --
 Plugin lifecycle  hooks */
  tsapi void TSPluginHookAdd(TSPluginHookID id, TSCont contp);



Re: Plugin lifecycle API - TS-1487, TS-2035

2013-07-17 Thread James Peach
On Jul 17, 2013, at 11:39 AM, Alan M. Carroll a...@network-geographics.com 
wrote:

 I was requested to provide the API that would go with this fix. Here is the 
 preliminary version. If any one has suggestions for better names, speak up.
 
  /** Plugin lifecycle hooks.
 
  These are called during lifecycle events of a plugin. They
  should be set in the plugin initialization function.
 
  TS_PLUGIN_PROXY_READY_HOOK - called once, after the HTTP proxy
  port data structures have been initialized. In particular, SSL
  related calls that depend on accept endpoints may be
  invoked. After this hook is finished, the proxy port sockets are
  opened and connections are accepted.
 
  TS_PLUGIN_CACHE_READY_HOOK - called once, after the cache is
  fully initialized and online.
 
   */
  typedef enum
  {
TS_PLUGIN_PROXY_READY_HOOK,
TS_PLUGIN_CACHE_READY_HOOK,
TS_PLUGIN_LAST_HOOK
  } TSPluginHookID;
 
  /* --
 Plugin lifecycle  hooks */
  tsapi void TSPluginHookAdd(TSPluginHookID id, TSCont contp);

What event ID and edata are delivered to the continuation?

J

Re: Plugin lifecycle API - TS-1487, TS-2035

2013-07-17 Thread Alan M. Carroll
Wednesday, July 17, 2013, 2:46:41 PM, you wrote:

 What event ID and edata are delivered to the continuation?

The event ID will be the hook ID and a null edata. I can't think of anything 
useful to return there.