This has been discussed a bit internally, but I wanted to post it here to see 
if it helped anyone else.

After discussing with Paul, I think the Indirector should be refactored 
slightly to make configuration a bit easier to control and much more obvious.

Specifically, I want to extract the main interface methods and configuration 
aspects into a Route class, leaving Indirection for just Terminus registration. 
 Here's the commit log for the first bit:

The primary goal here is to allow non-global
configurations of Indirector endpoints.  The previous behavior
still works fine:
  
  Catalog.find
  Node.find
  ...
  
But now you can do this:
  
  route = Puppet::Indirector::Route.new(:catalog)
  route.terminus_class = :yaml
  route.find
  
And it will use your configuration rather than the
global.
  
This should provide far more flexibility in the
different applications, and quite likely a lot more clarity
as to how the indirector works, while still providing
reasonable global behavior when people want it.

-----

I've published the code in my prototype/master/indirector_with_routes branch.

If there are no disagreements conceptually, I'll open this as a refactor ticket.

-- 
The conception of two people living together for twenty-five years
without having a cross word suggests a lack of spirit only to be
admired in sheep.  --Alan Patrick Herbert
---------------------------------------------------------------------
Luke Kanies  -|-   http://puppetlabs.com   -|-   +1(615)594-8199




-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Developers" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/puppet-dev?hl=en.

Reply via email to