[augeas-devel] [Matahari] Fwd: Re: Augeas-based configuration agent

David Lutterkort lutter at redhat.com
Thu May 12 16:20:52 UTC 2011


On Thu, 2011-05-12 at 16:49 +0200, Alan Pevec wrote:
> Instead of everything-is-a-file mantra, what about having callback
> function as an argument for aug_run?
> augeas lib would call it when there's something to give out or read in.
> That way client apps can support different sources if they wish,
> augtool for example really only needs to support files.

That's definitely one way to do it, but it makes using the API a little
more awkward in the simple case where you have a string or file (since
you need to write a callback function and set up a data structure to
hold the state for the callback)

I'd rather first do the simpler interfaces of reading from a string and
a file, and add the callback versions when there's a clear need for
something more complex.

David





More information about the augeas-devel mailing list